Chapter 6: Sampling and Estimation

Exercise 13: Political Race (Pg. 227)

If, based on a sample size of 200, a political candidate found that 125 people would vote for her in a two person race:

  1. what is the 99% confidence interval for her expected proportion of the vote?
N <- 200
p <- 125/200
z <- 2.576

c1 <- p - z*sqrt(p*(1-p)/N)
c2 <- p + z*sqrt(p*(1-p)/N)
cat("[",c1,", ",c2,"]")
## [ 0.5368167 ,  0.7131833 ]
  1. Would she be confident of winning based on this poll? Her probability of winning is the area to the right of 50%. We need to turn the 50% into a z score
(.5-.625)/sqrt(p*(1-p)/N)
## [1] -3.651484

We look up a z-score of -3.65 and get an area of .9999. This is the probability that she will lose! Therefore, she would not be confident of winning based on this poll.