Do you agree with the Supreme Court? Was there bias in jury selection? How might you approach this question statistically?
# The population of eligible jurors was 16000 26% were black How many
# white potential jurors were there in the county?
wPop <- 16000 * (1 - 0.26)
wPop
## [1] 11840
bPop <- 16000 * 0.26
white <- rep(0, wPop)
black <- rep(1, bPop)
pop <- c(black, white)
# Select a jury panel
panel <- sample(pop, 100, replace = F)
# make nsim jury panels by randomly sampling from the population
nsim <- 1e+06 #a million jury panels
panels <- matrix(nrow = nsim, ncol = 1)
for (i in 1:nsim) {
panel <- sample(pop, 100)
panels[i] <- sum(panel)
}
options(scipen = 1e+05) #supress scientifc notation
hist(panels, breaks = 30, xlim = c(0, 50), main = paste("Histogram of the number of African Americans on",
nsim, "jury panels \n assuming unbiased jury pool selection", sep = " "))
abline(v = 8, col = "red", lwd = 2) # draw a reference line at 8
paste("In our simulations of unbiased jury pool selection only ", sum(panels <=
8), " out of ", nsim, " jury pools (", (sum(panels <= 8)/nsim) * 100, " %) had 8 or fewer African Americans",
sep = "")
## [1] "In our simulations of unbiased jury pool selection only 3 out of 1000000 jury pools (0.0003 %) had 8 or fewer African Americans"