A candidate in a two-person election commissions a poll to determine who is ahead. The pollster randomly chooses 500 registered voters and determines that 260 out of the 500 favor the candidate. In other words, 0.52 of the sample favors the candidate. Although this point estimate of the proportion is informative, it is important to also compute a confidence interval. The confidence interval is computed based on the mean and standard deviation of the sampling distribution of a proportion. The formulas for these two parameters are shown below:
Since we do not know the population parameter , we use the sample proportion as an estimate. The estimated standard error of is therefore
We start by taking our statistic () and creating an interval that ranges ()() in both directions, where is the number of standard deviations extending from the mean of a normal distribution required to contain 0.95 of the area (see the section on the confidence interval for the mean). The value of is computed with the normal calculator and is equal to 1.96. We then make a slight adjustment to correct for the fact that the distribution is discrete rather than continuous.
Normal Distribution Calculator
R code:
prop.test(260,500,correct=TRUE)
1-sample proportions test with continuity correction
data: 260 out of 500, null probability 0.5
X-squared = 0.722, df = 1, p-value = 0.3955
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
0.4752277 0.5644604
sample estimates:
p
0.52