<meta http-equiv="refresh" content="1; url=/nojavascript/"> Confidence Intervals | CK-12 Foundation
You are reading an older version of this FlexBook® textbook: CK-12 Probability and Statistics - Advanced Go to the latest version.

# 7.4: Confidence Intervals

Created by: CK-12

## Learning Objectives

• Calculate the point estimate of a sample to estimate a population proportion.
• Construct a confidence interval for a population proportion based on a sample population.
• Calculate the margin of error for proportions as a function of sample proportion and size.
• Understand the logic of confidence intervals as well as the meaning of confidence level and confidence intervals.

## Introduction

The objective of inferential statistics is to use sample data to increase knowledge about the corresponding entire population. Sampling distributions are the connecting link between the collection of data by unbiased random sampling and the process of drawing conclusions from the collected data. Results obtained from a survey can be reported as a point estimate. For example, a single sample mean is called a point estimate because this single number is used as a plausible value of the population mean. Some error is associated with this estimate - the true population mean may be larger or smaller than the sample mean. An alternative to reporting a point estimate is identifying a range of possible values $p$ might take, controlling the probability that $\mu$ is not lower than the lowest value in this range and not higher than the largest value. This range of possible values is known as a confidence interval. Associated with each confidence interval is a confidence level. This level indicates the level of assurance you have that the resulting confidence interval encloses the unknown population mean.

Normal distribution specifies that $68\;\mathrm{percent}$ of data will fall within one standard error of the parameter. This logic can be turned around to state that any single random sample has a $68\;\mathrm{percent}$ chance of falling within that range. Likewise, we may say that we are confident that in $95\;\mathrm{percent}$ of samples, sample statistics are within plus or minus two standard errors of the population parameter. As the confidence interval is expanded for a given statistic, the confidence level increases.

The selection of a confidence level for an interval determines the probability that the confidence interval produced will contain the true parameter value. Common choices for the confidence level are $90, 95$ and $99\%$. These levels correspond to percentages of the area of the normal density curve. For example, a $95\%$ confidence interval covers $95\%$ of the normal curve -- the probability of observing a value outside of this area is less than $5\%$. Because the normal curve is symmetric, half of the area is in the left tail of the curve, and the other half of the area is in the right tail of the curve. This means that $2.5\%$ of the area is in each tail.

This graph was made using the TI-83 and shows a normal distribution curve for a set of data that has a mean of $(\mu = 50)$ and a standard deviation of $(\sigma = 12)$. A $95\%$ confidence interval for the standard normal distribution, then, is the interval $(-1.96, 1.96)$, since $95\%$ of the area under the curve falls within this interval. The $\pm 1.96$ are the $z-$scores that enclose the given area under the curve. For a normal distribution, the margin of error is the proportion that is added and subtracted from the mean to construct the confidence interval. For a $95\%$ confidence interval, the margin of error equals $\pm 1.96 \ \sigma$

The following example will help you to understand these terms and their meaning.

Example:

Jenny randomly selected $60$ muffins from one company line and had those muffins analyzed for the number of grams of fat that they each contained. Rather than reporting the sample mean (point estimate), she reported the confidence interval (interval estimator). Jenny reported that the number of grams of fat in each muffin is between $10.3 \;\mathrm{grams}$ and $11.2 \;\mathrm{grams}$ with $95\%$ confidence.

The population mean refers to the unknown population mean. This number is fixed, not variable, and the sample means are variable because the samples are random. If this is the case, does the confidence interval enclose this unknown true mean? Random samples lead to the formation of confidence intervals, some of which contain the fixed population mean and some of which do not. The most common mistake made by persons interpreting a confidence interval is claiming that once the interval has been constructed there is a $95\%$ probability that the population mean is found within the confidence interval. Even though the population mean is known, once the confidence interval is constructed, either the mean is within the confidence interval or it is not. Hence, any probability statement about this particular confidence interval is inappropriate. In the above example, the confidence interval is from $10.3$ to $12.1$ and Jenny is using a $95\%$ confidence level. The appropriate statement should refer to the method used to produce the confidence interval. Jenny should have stated that the method that produced the interval from $10.3$ to $12.1$ has a $0.95$ probability of enclosing the population mean. This does not mean that there is a $0.95$ probability that the population mean falls in the interval from $10.3$ to $12.1$. The probability is attributed to the method, not to any particular confidence interval. The following diagram demonstrates how the confidence interval provides a range of plausible values for the population mean and that this interval may capture the true population mean. If you formed $100$ intervals in this manner, $95\%$ of them would contain the population mean.

Example:

The following questions are to be answered with reference to the above diagram.

a) Were all four sample means within $1.96 \frac{\sigma} {\sqrt{n}}$, or $1.96 \sigma_{\bar{x}}$, of the population mean? Explain.

b) Did all four confidence intervals capture the population mean? Explain.

c) In general, what percentage of $\bar {x}'\mathrm{s}$ should be within $1.96 \frac{\sigma} {\sqrt{n}}$ of the population mean?

d) In general, what percentage of the confidence intervals should contain the population mean?

Solution:

a) The sample mean $(\bar {x})$ for Sample 3 is not within $1.96 \frac{\sigma} {\sqrt{n}}$ of the population mean. It does not fall within the two vertical lines on the left and right of the sampling distribution of the sample mean.

b) The confidence interval for Sample 3 does not enclose the population mean. This interval is just to the left of the population mean $(\mu)$, which is labeled as the vertical line found in the middle of the sampling distribution of the sample mean.

c) $95\%$

d) $95\%$

When the sample size is large $(n \ge 30)$, the confidence interval for the population mean is calculated as shown below:

$\bar{x} \pm z \frac{\sigma} {\sqrt{n}}$ where $z$ is $1.96$ for a $95\%$ confidence interval; $1.645$ for a $90\%$ confidence interval and $2.56$ for a $99\%$ confidence interval.

Example:

Julianne collects four samples of size $60$ from a known population with a population standard deviation of $19$ and a population mean of $110$. Using the four samples, she calculates the four sample means to be:

$& 107 & & 112 & & 109 & & 115$

a) For each sample, determine the $90\%$ confidence interval?

b) Do all four confidence intervals enclose the population mean? Explain.

Solution:

a)

$& \bar{x} \pm z \frac{\sigma} {\sqrt{n}} & & \bar{x} \pm z \frac{\sigma} {\sqrt{n}} & & \bar{x} \pm z \frac{\sigma} {\sqrt{n}}\\& 107 \pm 1.645 \frac{19} {\sqrt{60}} & & 112 \pm 1.645 \frac{19} {\sqrt{60}} & & 109 \pm 1.645 \frac{19} {\sqrt{60}}\\& 107 \pm 4.04 & & 112 \pm 4.04 & & 109 \pm 4.04\\& \text{from}\ 102.96\ \text{to}\ 111.04 & & \text{from}\ 107.96\ \text{to} \ 116.04 & & \text{from}\ 104.96\ \text{to} \ 113.04$

$& \bar{x} \pm z \frac{\sigma} {\sqrt{n}}\\& 115 \pm 1.645 \frac{19} {\sqrt{60}}\\& 115 \pm 4.04\\& \text{from}\ 110.96 \ \text{to} \ 119.04$

b) Three of the confidence intervals enclose the population mean. The interval from $110.96$ to $119.04$ do not enclose the population mean.

Example:

Now it is time to use the graphing calculator to simulate the collection of three samples of different sizes $â€“ 30, 60, 90$ respectively. The three sample means will be calculated as well as the three $95\%$ confidence intervals. The samples will be collected from a population that displays a normal distribution with a population standard deviation of $108$ and a population mean of $2130$.

randInt$(\mu, \sigma, n)$ store in $L_1$ Sample size $= 30$

randInt$(\mu, \sigma, n)$ store in $L_2$ Sample size $= 60$

randInt$(\mu, \sigma, n)$ store in $L_3$ Sample size $= 90$

The lists of numbers can be viewed by [Stat] enter. The next step is to calculate the mean of each of these samples.

[List] $\rightarrow$ [Math] $\rightarrow$ mean$(L_1)$ $1309.6$ Repeat this for $(L_2) 1171.1$ and $(L_3) 1077.1$.

The three confidence intervals are:

$& \bar{x} \pm z \frac{\sigma} {\sqrt{n}} & & \bar{x} \pm z \frac{\sigma} {\sqrt{n}} & & \bar{x} \pm z \frac{\sigma} {\sqrt{n}}\\& 1309.6 \pm 1.96 \frac{108} {\sqrt{30}} & & 1171.1 \pm 1.96 \frac{108} {\sqrt{60}} & & 1077.1 \pm 1.96 \frac{108} {\sqrt{90}}\\& 1309.6 \pm 38.65 & & 1171.1 \pm 27.33 & & 1077.1 \pm 22.31\\& \text{from}\ 1270.95 \ \text{to} \ 1348.25 & & \text{from}\ 1143.77 \ \text{to} \ 1198.43 & & \text{from}\ 1054.79 \ \text{to} \ 1099.41$

As was expected, the value of $\bar {x}$ varied from one sample to the next. The other fact that was evident was that as the sample size increased, the length of the confidence interval became smaller or decreased.

In all of the examples shown above, you calculated the confidence intervals for the population mean using the formula $\bar {x} \pm z \frac{\sigma} {\sqrt{n}}$. However, to use this formula, the population standard deviation $(\sigma)$ had to be known in order to calculate the interval. If this value is unknown and if the sample size is large $(n \ge 30)$, the population standard deviation can be replaced with the sample standard deviation. Thus, the formula $\bar {x} \pm z \frac{S_x} {\sqrt{n}}$ can be used as an interval estimator. An interval estimator of the population mean is called a confidence interval. This formula is valid only for simple random samples. Since $z \frac{S_x} {\sqrt{n}}$ is actually the margin of error, a confidence interval can be thought of simply as: $\bar{x} \pm$ the margin of error.

Example:

A committee set up to field - test questions from a provincial exam, randomly selected Grade $12$ students to answer the test questions. The answers were graded and the sample mean and sample standard deviation were calculated. Based on the results, the committee predicted that on the same exam, Grade $12$ students would score an average grade of $65\%$ with accuracy within $3\%$, $9 \;\mathrm{times}$ out of $10$.

a) Are you dealing with a $90\%, 95\%$ or $99\%$ confidence level?

b) What is the margin of error?

c) Calculate the confidence interval.

d) Explain the meaning of the confidence interval.

Solution:

a) You are dealing with a $90\%$ confidence level. This is indicated by $9 \;\mathrm{times}$ out of $10$.

b) The margin of error is $3\%$.

c) The confidence interval is $\bar {x} \pm$ the margin of error which is $62\%$ to $68\%$.

d) There is a $0.90$ probability that the method used to produce this interval from $62\%$ to $68\%$ results in a confidence interval that encloses the population mean (the true score for this provincial exam)

The calculation of a confidence interval for a population proportion is similar to that explained above for a sample mean. For a confidence interval of $95\%$, the sampling distribution of the sample proportions is approximately normal with large sample sizes $(n \ge 30)$. From this statement you can say that $95\%$ of the sample proportions from a population are within two standard deviations (more accurately $1.96$ standard deviations) of the population proportion. This is shown in the diagram below:

Therefore, if a single sample proportion is within $1.96 \sqrt{\frac{p(1 - p)} {n}}$ of the population proportion, then the interval $\hat {p} - 1.96 \sqrt{\frac{p (1 - p)} {n}}$ to $\hat {p} + 1.96 \sqrt{\frac{p(1 - p)} {n}}$ will capture the population proportion. This will happen for $95\%$ of all possible samples. If you look at the above formulas, you should notice that the population proportion $(p)$ and the sample proportion $(\hat {p})$ are both used to calculate the confidence interval. However, in real-life situations, the population proportion is seldom known. Therefore,$(p)$ is most often replaced with $(\hat {p})$ in the formulas above so that they now become:

$\hat {p} - 1.96 \sqrt{\frac{\hat {p} (1 - \hat {p})} {n}}$ and $\hat {p} + 1.96 \sqrt{\frac{\hat {p} (1 - \hat {p})} {n}}$ or in a more standard form $p \pm z \sqrt{\frac{\hat {p}(1 - \hat {p})} {n}}$ There are two restrictions that apply to this formula: 1) $np \ge 5$ and 2) $n (1 - p) \ge 5$.

As before, the margin of error is $z \sqrt{\frac{\hat {p}(1 - \hat {p})} {n}}$ and the confidence interval is $\hat {p} \pm$ the margin of error.

Example:

A large grocery store has been recording data regarding the number of shoppers that use savings coupons at their outlet. Last year it was reported that $77\%$ of all shoppers used coupons, and these results were considered accurate within $2.9\%$, $19 \;\mathrm{times}$ out of $20$.

a) Are you dealing with a $90\%, 95\%$ or $99\%$ confidence level?

b) What is the margin of error?

c) Calculate the confidence interval.

d) Explain the meaning of the confidence interval.

Solution:

a) The statement $19 \;\mathrm{times}$ out of $20$ indicates that you are dealing with a $95\%$ confidence interval.

b) The results were accurate within $2.9\%$, so the margin of error is $2.9\%$.

c) The confidence interval is simply $\hat {p} \pm$ the margin of error.

$& 77\% - 2.9\% = 74.1\% && 77\% + 2.9\% = 79.9\%$

The confidence interval is from $74.1\%$ to $79.9\%$.

d) The $95\%$ confidence interval from $74.1\%$ to $79.9\%$ for the population proportion is an interval calculated from a sample by a method that has a $0.95$ probability of capturing the population proportion.

## Lesson Summary

In this lesson you learned that a sample mean is known as a point estimate because this single number is used as a plausible value of the population mean. In addition to reporting a point estimate, you discovered how to calculate an interval of reasonable values based on the sample data. This interval estimator of the population mean is called the confidence interval. You can calculate this interval for the population mean by using the formula $\bar {x} \pm z \frac{\sigma} {\sqrt{n}}$. The values of $z$ are different for each confidence interval of $90\%, 95\%$ and $99\%$. You also learned that the probability is attributed to the method used to calculate the confidence interval.

## Points to Consider

• Does replacing $\sigma$ with $s$ change your chance of capturing the unknown population mean?
• Is there a way to increase the chance of capturing the unknown population mean?

## Review Questions

1. In a local teaching district a technology grant is available to teachers in order to install a cluster of four computers in their classrooms. From the $6250$ teachers in the district, $250$ were randomly selected and asked if they felt that computers were an essential teaching tool for their classroom. Of those selected, $142$ teachers felt that computers were an essential teaching tool.
1. Calculate a $99\%$ confidence interval for the proportion of teachers who felt that computers are an essential teaching tool.
2. How could the survey be changed to narrow the confidence interval but to maintain the $99\%$ confidence interval?
2. Josie followed the guidelines and conducted a binomial experiment. She did $300$ trials and reported a sample proportion of $0.61$.
1. Calculate the $90\%, 95\%$ and $99\%$ confidence intervals for this sample.
2. What did you notice about the confidence intervals as the confidence level increased? Offer an explanation for your findings?
3. If the population proportion were $0.58$, would all three confidence intervals enclose it? Explain.

1. $\hat {p} & = \frac{x} {n} && \hat {p} \pm z \sqrt{\frac{\hat {p}(1 - \hat{p})} {n}}\\\hat {p} & = \frac{142} {250} && 0.568 \pm 2.56 \sqrt{\frac{0.568(1 - 0.568)} {250}} \\\hat {p} & = 0.568 && 0.568 \pm 0.080$ The interval is from $0.488$ to $0.648$ OR from $48.8\%$ to $64.8\%$
2. The $99\%$ confidence interval could be narrowed by increasing the sample size from $250$ to a larger number.
1. $& \hat {p} \pm z \sqrt{\frac{\hat {p}(1 - \hat{p})} {n}} && \hat {p} \pm z \sqrt{\frac{\hat {p}(1 - \hat{p})} {n}}\\& 0.61 \pm 1.645 \sqrt{\frac{0.61(1 - 0.61)} {300}} && 0.61 \pm 2.56 \sqrt{\frac{0.61(1 - 0.61)} {300}}\\& \text{from}\ 0.564 \ \text{to}\ 0.656 && \text{from}\ 0.555 \ \text{to}\ 0.665\\& \hat {p} \pm z \sqrt{\frac{\hat {p}(1 - \hat{p})} {n}}\\& 0.61 \pm 1.96 \sqrt{\frac{0.61(1 - 0.61)} {300}}\\& \text{from}\ 0.538 \ \text{to}\ 0.682$
2. The confidence interval got wider as the confidence level increased. To increase the probability of enclosing the population proportion a wider confidence interval must be chosen.
3. Yes, all three confidence intervals would capture the population proportion if it were $0.58$.

## Vocabulary

Binomial Experiment
A type of survey or experiment in which there is a fixed number of trials that have one of only two outcomes. The probability of success for any trial is equal to the population proportion and remains the same for every trial. The outcomes for each trial are independent of one another and the binomial random variable, $x$, is the number of successes observed in $n$ trials.
Confidence Interval
An interval of plausible values for a population parameter. Any of the values in the interval could be used to define a population for which the defined sample statistic would be a likely outcome.
Confidence Level
The probability that the method used to calculate the confidence interval will produce an interval that will enclose the population parameter.
Interval Estimator
Another name for a confidence interval
Point Estimate
A single number, such as a single sample mean, that is used as a plausible value of the population mean. This can also be another single value that represents a population parameter.
Population Proportion
A fraction of the population that possesses a certain characteristic or probability of an event occurring. The characteristic or event is called a success.
Sample Proportion
The ratio of successes $x$ to sample size $n$.

## Date Created:

Feb 23, 2012

Jul 03, 2014
Files can only be attached to the latest version of None