#Part 1
x = rbinom(10, 1, 0.4)
mu = mean(x)
lb = mu - 1.96 * sd(x) / sqrt(10) #lower bound for 95% CI
ub = mu + 1.96 * sd(x) / sqrt(10) #upper bound for 95% CI
lb
ub
#Part 2
count = 0 #counts how many CI countain the true mean
avgD
for(i in 1:100) cfw_
y