library(googlesheets4)
library(ggplot2); library(dplyr)
#url <- "URL TO SHEET HERE" # hidden
Sex Discrimination Case Study
Load libraries and specify URL to google sheets (hidden)
Import data and visualize
<- read_sheet(url) %>%
sim.data select(mfdiff = `(Male - female) difference`)
ggplot(sim.data, aes(x = mfdiff)) +
geom_dotplot() + theme_bw() +
geom_vline(xintercept = .292, color = "blue") +
xlab("point estimate")
Tip
Describe the distribution of this graph. What does it seem to be centered around?
The distribution of the point estimate (
Tip
In what percent of simulations did we observe a difference of at least 29.2% (0.292)?
table(sim.data$mfdiff > .292) |> prop.table()
FALSE TRUE
0.94444444 0.05555556
In our analysis, we determined that there was only a 5.6% chance of obtaining a sample where