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

$\$

Is there a significant correlation between movie budget and movie revenue?

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? 

$\$

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

$\$

# 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? 


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