Problems 1 - 4 and parts a) - d) of Problem 5 are on separte piece of paper to be turned in on 9/18/19 in class.
nsim=10000
n=30
x_obs=17
p0=0.69
nullDist<-rbinom(nsim, n, p0)
head(nullDist)
## [1] 21 23 22 24 17 21
hist(nullDist)
abline(v=17, col="red")
head(nullDist<=x_obs)
## [1] FALSE FALSE FALSE FALSE TRUE FALSE
mean(nullDist<=x_obs)*2
## [1] 0.2092