Publications by Kitada Smalley
Intro Statistics: R Glossary
Part I: Basic Functions 1) Concatination Concatination is done to create a vector. x<-c(1, 2, 3, 4) x ## [1] 1 2 3 4 2) Mean The mean function calculates the arithmetic mean (or average). The equation for the sample mean is \[\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i\] # the averaage mpg mean(x) ## [1] 2.5 If there is an NA in the dataset, we will ne...
3333 sym R (3593 sym/38 pcs) 10 img
Star Wars Viz
Star Wars VIZ library(tidyverse) # Read the data ep4 <- read.table("https://storage.googleapis.com/kagglesdsdata/datasets/25491/32521/SW_EpisodeIV.txt?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20211008%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20211008T083629Z&X-Goog-Expires=2...
217 sym R (2330 sym/3 pcs) 2 img
Regression Partner Lab: Climate Change
library(tidyverse) Example: Climate Change and Fish Habitats As the climate grows warmer, we expect many animal species to move toward the poles in an attempt to maintain their preferred temperature range. Do data on fish in the North Sea confirm this suspicion? The data are 25 years of mean winter temperatures at the bottom of the North Sea (de...
1391 sym R (3535 sym/18 pcs) 6 img
Fall 2021 Data Challenge: WU Team
ASA Fall Data Challenge Code Part 0: Data Gathering Read in dataset The original data set used the string NULL instead of NA, which causes the columns of the the data set to be imported as string type rather than numeric. To fix this we changed all NULLs in the dataset to NAs in the original excel file and then uploaded it to github, to then be...
7462 sym R (42334 sym/134 pcs) 5 img
Inference for Regression
UPDATED: FALL 2021 Motivating Example: Breakfast Cereal Data is a sample of 30 breakfast cereals. cereal<-read.csv("https://raw.githubusercontent.com/kitadasmalley/MATH138/main/HAWKES/Data/cerealDat.csv", header=TRUE) str(cereal) ## 'data.frame': 77 obs. of 15 variables: ## $ Shelf : Factor w/ 3 levels ...
724 sym R (5094 sym/26 pcs) 10 img
MATH266: Birthday Problem
The Problem Th “birthday problem” is a famous example used in statistics classes that asks for the probability that, in a set of \(n\) randomly chosen people, at least two will share a birthday. Simulation: Try it out! STEP 1) Can you simulate \(n=25\) random birthdays? Hint: Use the sample() function class<-sample(1:365, size=25, replace=...
1318 sym R (1518 sym/15 pcs) 1 img
(Rmd Template) Introduction to ggplot2: Part 2 (Bars)
Content Reference: This lab reference practice problems from “R for Data Science” - Chapter 3: Data Visualisation https://r4ds.had.co.nz/data-visualisation.html In this lab we will discuss and apply: Position Adjustments (for bars) Geometric Objects Example 1: Diamonds First, call the tidyverse package library(tidyverse) The diamonds datas...
2454 sym R (1364 sym/16 pcs) 3 img
(Rmd Template) Introduction to ggplot2: Part 1 (Points)
Content Reference: This lab reference practice problems from “R for Data Science” - Chapter 3: Data Visualisation https://r4ds.had.co.nz/data-visualisation.html In this lab we will discuss and apply: Data and aesthetic mappings Geometric Objects Faceting Example 1: MPG Dataset First, call the tidyverse package library(tidyverse) The mpg da...
3002 sym R (2153 sym/30 pcs) 2 img
MATH266: Law of Total Variability
A penny for your thoughts The coin minting machine is on the fritz, causing the coins to be weighted/unfair (i.e. there is not a 50% chance of either heads or tails outcomes) randomly. Let the probability of observing a head be given by a continuous uniform distribution, \(Y\sim Unif(0,1)\). Let \(X\) be the random outcome of a coin flip, where ...
2309 sym R (1981 sym/20 pcs) 5 img
(Rmd Template) Review of Simple Linear Regression in R
Earthquake Data The data set give the locations of 1000 seismic events of MB > 4.0. The events occurred in a cube near Fiji since 1964. lat = Latitude of event long = Longitude depth = Depth (km) mag = Richter magnitude stations = Number of statitions reporting Import the Data library(tidyverse) data(quakes) Step Zero: Relationships Between Va...
3446 sym R (1286 sym/20 pcs)