knitr::opts_chunk$set(echo = TRUE)
library(SDS100)

$\$

Hypothesis test for more than 2 means

$\$

Does the price of the college differ depending on whether the college is in a City, Town, Rural, or Suburb location?

$\$

library(SDS100)


# Step 1: 






# Step 2: 

# Get the data, visualize it, and computer the statistic of interest

# load the data..

# SDS100::download_data("CollegeScores4yr.csv")

college <- read.csv("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


table(college$Locale)


# visualize the data - does there appear to be a difference? 



# calculate the MAD statistic
# get_MAD_stat(data_vector, grouping_vector)









# Step 3: Create the null distribution





# visualize the null distribution 




# 4. Get the p-value





# 5. Decision? 

$\$

Hypothesis test for correlation

Do movies that have larger budgets have larger profits?

Let's look at correlation between budget and profit!

### Hypothesis test for correlation --------------


library(fivethirtyeight)



# Hypothesis tests for correlations!



# step 1





# step 2

bechdel3 <- na.omit(bechdel)

budget <- bechdel3$budget_2013
gross <- bechdel3$domgross_2013


# plot the data and calculate the observed statistic 






# step 3: null distribution!!!




# visualize the null distribution 






# step 4






# step 5


emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.