knitr::opts_chunk$set(echo = TRUE)
library(SDS100)
$\$
library(fivethirtyeight) # Step 1: # Step 2: # Get the data, visualize it, and computer the statistic of interest bechdel2 <- na.omit(bechdel) budget <- bechdel2$budget_2013 revenue <- bechdel2$domgross_2013 # visualize the data # calculate the observed correlation # Create the null distribution # visualize the null distribution # 4. Get the p-value # 5. Decision?
$\$
$\$
# Step 1: # Step 2: # Get the data, visualize it, and computer the statistic of interest # load the data.. college <- read.csv("https://www.lock5stat.com/datasets3e/CollegeScores4yr.csv") college <- na.omit(college) # delete rows with missing data # how many colleges are in each type of location? cost <- college$Cost locale <- college$Locale # visualize the data - does there appear to be a difference? # calculate the MAD statistic # get_MAD_stat(data_vector, grouping_vector) # Create the null distribution # visualize the null distribution # 4. Get the p-value # 5. Decision?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.