Confidence Intervals for Correlation and Proportion

First, this section shows how to compute a confidence interval for Pearson's correlation. The solution uses Fisher's z transformation. Then, it explains the procedure to compute confidence intervals for population proportions where the sampling distribution needs a normal approximation.

Proportion

Learning Objectives


  1. Estimate the population proportion from sample proportions
  2. Apply the correction for continuity
  3. Compute a confidence interval


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:

μp = π

  \sigma_ p = \sqrt {\dfrac{ \pi (1- \pi) }{N}}
Since we do not know the population parameter π, we use the sample proportion p as an estimate. The estimated standard error of p is therefore

  \S_p = \sqrt {\dfrac{ p (1- p) }{N}}

We start by taking our statistic (p) and creating an interval that ranges (Z_{.95})(s_p) in both directions, where Z_{.95} 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 Z_{.95} 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

s_p is calculated as shown below:

  \S_p = \sqrt {\dfrac{ .52 (1- .52) }{500}} = 0.0223

To correct for the fact that we are approximating a discrete distribution with a continuous distribution (the normal distribution), we subtract 0.5/N from the lower limit and add 0.5/N to the upper limit of the interval. Therefore the confidence interval is

 p \pm Z_.95 \sqrt {\dfrac{p(1-p)}{N}} \pm \dfrac{0.5}{N}

Lower limit: 0.52 - (1.96)(0.0223) - 0.001 = 0.475
Upper limit: 0.52 + (1.96)(0.0223) + 0.001 = 0.565

0.475 ≤ π ≤ 0.565

Since the interval extends 0.045 in both directions, the margin of error is 0.045. In terms of percent, between 47.5% and 56.5% of the voters favor the candidate and the margin of error is 4.5%. Keep in mind that the margin of error of 4.5% is the margin of error for the percent favoring the candidate and not the margin of error for the difference between the percent favoring the candidate and the percent favoring the opponent. The margin of error for the difference is 6.36%, the square root of 2 times the margin of error for the individual percent. Keep this in mind when you hear reports in the media; the media often get this wrong.


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