A144confidenceintervals


 * Confidence Intervals **


 * We will now return to the idea of using one sample from the population to find an estimate for p (the population proportion)
 * Sometimes a single sample proportion (p-hat) is called a ** point estimate for p **.


 * From our work in the previous section (Distribution of sample proportions), we know that we cannot expect the sample proportion (p-hat) of any one sample to exactly match the population proportion (p)


 * Our goal in this section, is to produce an interval either side of p-hat, so that we can say that the probability p lies within that interval is a given percentage.
 * This interval either side of p-hat is called a ** Confidence Interval **.


 * A Confidence Interval of 95% is very common.
 * ie, There is a probability of 95% that p lies in the interval:

math . \qquad \qquad \Big( \hat{p} - c, \; \hat{p} + c \Big) \quad \text{ for some value of c} \qquad. \\ . \\ \text{or} \\. \\ . \qquad \qquad \text{Pr} \big( \hat{p} - c < p < \hat{p} + c \big) = 0.95 \qquad. \\ . \\ math


 * We now assume that p-hat is normally distributed with a mean of p
 * This is a reasonable assumption if the sample size is sufficiently large.


 * For the confidence interval to have a probability of 95%, it will need to be the same width as the width of the 95% area of the normal distribution curve

math . \qquad \qquad \text{Pr} \big(-a < z < a \big) = 0.95 \qquad. math
 * Referring back to the Standard Normal Distribution (Z), we can use the Inverse Normal Distribution to find a such that:


 * On the Casio Classpad: enter:
 * InvNormCDF,
 * tail = center
 * prob = 0.95
 * s.d. = 1
 * mean = 0
 * This should give a result of a = ±1.96

math . \qquad \qquad \qquad \text{Pr} \big( z < b \big) = \dfrac{1-0.95}{2} = 0.025 \qquad. math
 * If your calculator can only do left tail calculations, then you will need to find b such that
 * This should also give a result of b = –1.96

Therefore, math . \qquad \qquad \text{Pr} \big(-1.96 < z < 1.96 \big) = 0.95 \qquad. math

math . \qquad \text{Now we can use the rule to convert } z \text{ into } \hat{p} \text{ given that } \mu = p \qquad. math

math . \qquad \qquad z = \dfrac{x - \mu}{\sigma} \qquad \Longrightarrow \qquad z = \dfrac{\hat{p} - p}{\sigma} \qquad. math

math . \qquad \qquad \text{Pr} \big(-1.96 < \dfrac{\hat{p} - p}{\sigma} < 1.96 \big) = 0.95 \qquad. math

math . \qquad \qquad \text{Pr} \big(-1.96\sigma < \hat{p} - p < 1.96\sigma \big) = 0.95 \qquad. math

math . \qquad \qquad \text{Pr} \big(-\hat{p} - 1.96\sigma < - p < -\hat{p} + 1.96\sigma \big) = 0.95 \qquad. math

math . \qquad \qquad \text{Pr} \big(\hat{p} + 1.96\sigma > p > \hat{p} - 1.96\sigma \big) = 0.95 \qquad. math

Or: math . \qquad \qquad \text{Pr} \big(\hat{p} - 1.96\sigma < p < -\hat{p} + 1.96\sigma \big) = 0.95 \qquad. math

math \text{We know that the theoretical standard deviation is given by } \sigma = \sqrt{ \dfrac{p(1-p)}{n} } \qquad. math

math \text{But in a practical situation, we don't know the actual value of } p. \qquad. \\ . \\ \text{So we use } \hat{p} \text{ as an approximate value for } p \text{ and we get:} \\. \\ . \qquad \qquad \sigma \approx \sqrt{ \dfrac{ \hat{p} \big( 1 - \hat{p} \big) }{n} } math


 * So, the 95% confidence interval is given by: **

math . \qquad \qquad \text{Pr} \Big( \hat{p} - 1.96\sqrt{ \dfrac{ \hat{p} \big( 1 - \hat{p} \big) }{n}} < p < \hat{p} + 1.96\sqrt{ \dfrac{ \hat{p} \big( 1 - \hat{p} \big) }{n}} \Big) \approx 0.95 \qquad. math


 * ** Note: ** the constant 1.96 came from the z-score where the central region was 95%

.