Confidence Intervals
This section is concerned with estimating a population mean. We could estimate a population mean by drawing a random sample from the population and use the mean of the sample as our estimate for the mean of the population. We don't expect the sample mean to be exactly equal to the population mean because the sample utilizes only a small fraction of the information contained in the population. So this method of estimating a population mean leaves us with a great deal of uncertainty because we wonder just how close our sample mean is to the population mean. A better idea is to construct an interval centered around the sample mean in which we are fairly confident contains the population mean. Suppose our sample mean was 48, a significant amount of uncertainty could be remove if we could say that we are are 95% confident that the population mean lies in the interval 48, plus or minus 3 units. That is, we are 95% confident that the population mean lies in the interval [45, 51]. An interval such as this is called a 95% confidence interval (CI) estimate of the population mean. In practice, statisticians usually construct 90% , 95%, or 99% confidence intervals for estimating a population mean.Constructing a 95% Confidence Interval For a Population Mean
The central limit theorem tells us that for large samples the distribution of sample means takes on the shape of a normal curve. The empirical rule for normal curves tells us that approximately 95% of all sample means l lie within 2 standard deviations of the grand mean or what is the same thing, the population mean (actually it is 1.96). Thus 95 % of all sample means will lie in the interval:


The part of the inequality to the right of All Sample means is called the margin of
error, E.
E = 
The 95% confidence interval for a population mean should upper and lower bounds given by:

Often we don not know the population standard deviation (sigma). We can substitute the sample standard
(s) deviation in place of the population standard deviation provided we select a
large (30 or greater) sample.
Below are the steps required to make a 95% confidence interval estimation of a population mean.

In the previous section we were able to compute confidence intervals even when the population standard deviation was unknown by selecting a large sample and substituting the sample standard deviation for the population standard deviation. In most real-life situations the population standard deviation is unknown. In addition, we are unable to select large samples due to circumstances. For example, a doctor may only have 6 patients available for a study or there may only be 10 skeletal remains of some extinct animal for study. If we must select a small sample and have no knowledge of the the population standard deviation, then we must use a distribution called a "students t-distribution" or simply a "t-distribution" provide the population is essentially normal. The students t-distribution was discovered by William H. Gossett (1876-1937) at age 23. Gossett worked for the Guinness Brewing Company in Dublin, Ireland. The brewing company frowned upon employees publishing their research and so Gossett published under the pen name student.
Characteristics of the
t-Distribution
(a) select the t distribution
(b) Then select the two tail version, third diagram
(c) enter the degree of freedom df = sample size -1
(d). under probability enter .95 for a 95% CI
(e) click the left pointing arrow key to read the critical t value.
Example: Suppose you selected 16 batteries in a random fashion and found that their mean life was 3.58 hours with a standard deviation of 1.85 hours. Construct a 95%CI for the mean life of all AA batteries. Assume that the random variable : mean battery life in hours is normally distributed.
Solution:
(a) select the t distribution(b) select diagram number three
(c) enter df = 16-1 =15
(d) under probability enter 0.95
(e) click the left pointing arrow key
(f) critical t = 2.131
(g) Upper bound for the confidence interval
3.58 + (2.131)(1.85)/sqrt(16)
3.58 + (2.131)(1.85)/4.0
3.58 + 0.99
4.57
(h) Lower bound for the confidence interval
3.58 - (2.131)(1.85)/sqrt(16)
3.58 - (2.131)(1.85)/4
3.58 - 0.99
2.59
Thus a 95% CI for the mean life of AA batteries is [2.59 hrs,4.57hrs].
You may be wondering we we should do in the case where the population standard deviation is unknown, and the population is not normally distributed and the sample size is small. In this case we would use a nonparametric technique . We will not study this situation in this course.
Summary

Determining The Sample Size
Now, suppose we want to narrow the width of the 95% confidence interval to 3 units wide. Put another way, we want the margin of error to be 1.5 units.
Lets review the formula for calculating the margin of error or E:

Where Z is replaced with 1.96 for a 95% CI or 1.645 for a 90% CI or 2.575 for a 99% CI.