knitr::opts_chunk$set(echo = TRUE)

$\$

Quantiles on the Bechdel data

Q: 70% of movies made less than how much money?

library(fivethirtyeight)

$\$

Boxplots on the Bechdel data

# get pass fail data separately

bechdel_pass_df <- subset(bechdel, binary == "PASS")
bechdel_fail_df <- subset(bechdel, binary == "FAIL")

domgross_pass <- bechdel_pass_df$domgross_2013 
domgross_fail <- bechdel_fail_df$domgross_2013 



# boxplot





# log 10 of the data boxplot

$\$

Scatterplots and Correlation

Do movies that have larger budgets make more profit?

# original data
budget <- bechdel$budget_2013
profit <- bechdel$domgross_2013


# create scatterplot











# look at log10 of the data scatter plot

budget_log10 <- log10(budget)
profit_log10 <- log10(profit)




# create scatterplot

$\$

Does playing football affect brain size?

library(Lock5Data)

# get the data from the data frame
years_played <- FootballBrain$Years
hippocampus_vol <- FootballBrain$Hipp
group <- FootballBrain$Group




# create scatterplot and calculate the correlation





# create side-by-side boxplots for the different groups


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