4.6  Inference for the Population Mean
4.6  Inference for the Population MeanIn this section, we discuss how to find confidence intervals for the population mean. The idea and interpretation of the confidence interval will be similar to that of the population proportion only applied to the population mean, \(\mu\).
We start with the case where the population standard deviation, \(\sigma\), is known. We continue to the more realistic case where \(\sigma\) is not known. For the latter case, we need to recall the \(t\)distribution. We end this section by presenting how to determine a sample size for a desired margin of error and confidence.
 Point Estimates for a Population Mean

The point estimate of the population mean, \(\mu\) is:
\(\bar{x}=\) sample mean
If one wants to know how accurate the sample mean is to estimate the population mean, we need some probability statement. We will want to know the sampling distribution of \(\bar{x}\). From this distribution, we can get a confidence interval. Such an interval provides a range of values for which the parameter value is believed to fall. An interval is more likely to be "correct" than a point estimate.
4.6.1  Construct and Interpret the CI
4.6.1  Construct and Interpret the CIConstructing a Confidence Interval for the Population Mean
To construct a confidence interval for a population mean, we're going to apply the same three steps as with the population proportion, but first, let's look at the two possible cases.
Case 1: \(\sigma\) is known
In the previous lesson, we learned that if the population is normal with mean \(\mu\) and standard deviation, \(\sigma\), then the distribution of the sample mean will be Normal with mean \(\mu\) and standard error \(\frac{\sigma}{\sqrt{n}}\).
Following the similar idea to developing the confidence interval for \(p\), the \((1\alpha)\)100% confidence interval for the population mean \(\mu\) is...
\(P\left(\left\dfrac{\bar{x}\mu}{\dfrac{\sigma}{\sqrt{n}}}\right\le z_{\alpha/2}\right)=1\alpha\)
A little bit of algebra will lead you to...
\(P\left(\bar{x}z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}\le \mu\le \bar{x}+z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}\right)=1\alpha\)
In other words, the \((1\alpha)\)100% confidence interval for \(\mu\) is:
\(\bar{x}\pm z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}\)
Notice for this case, the only condition we need is the population distribution to be normal.
The case where \(\sigma\) is known is unrealistic. We explain it here briefly because it reinforces what we have previously learned. We do not present examples in this case.
Case 2: \(\sigma\) is unknown
When the population is normal or when the sample size is large then,
\(Z=\dfrac{\bar{x}\mu}{\dfrac{\sigma}{\sqrt{n}}}\)
where Z has a standard Normal distribution.
Usually, we don't know \(\sigma\), so what can we do?
Recall that if X comes from a normal distribution with mean, \(\mu\), and variance, \(\sigma^2\), or if \(n\ge 30\), then the sampling distribution will be approximately normal with mean $\mu$ and standard error, \(SE(\bar{X})=\frac{\sigma}{\sqrt{n}}\)
One way to estimate \(\sigma\) is by \(s\), the standard deviation of the sample, and replace \(\sigma\) by \(s\) in the above Zequation. However, this new quotient no longer has a Zdistribution. Instead it has a tdistribution. We call the following a ‘studentized’ version of \(\bar{X}\):
\(t=\dfrac{\bar{X}\mu}{\dfrac{s}{\sqrt{n}}}\)
Constructing the Confidence Interval
 Step 1: Check the Conditions
One of the following conditions need to be satisfied:

If the sample comes from a Normal distribution, then the sample mean will also be normal. In this case, \(\dfrac{\bar{x}\mu}{\frac{s}{\sqrt{n}}}\) will follow a \(t\)distribution with \(n1\) degrees of freedom.

If the sample does not come from a normal distribution but the sample size is large (\(n\ge 30\)), we can apply the Central Limit Theorem and state that \(\bar{X}\) is approximately normal. Therefore, \(\dfrac{\bar{x}\mu}{\frac{s}{\sqrt{n}}}\) will follow a \(t\)distribution with \(n1\) degrees of freedom.

 Step 2: Construct the General Form
\((1\alpha)\)100% Confidence Interval for the Population Mean, \(\mu\)
\(\bar{x}\pm t_{\alpha/2}\dfrac{s}{\sqrt{n}}\)
where the tdistribution has \(df = n  1\). This interval is also known as the onesample tinterval for the population mean.
 Step 3: Interpret the Confidence Interval
We are \((1\alpha)100\%\) confident that the population mean, \(\mu\), is between \(\bar{x}t_{\alpha/2}\frac{s}{\sqrt{n}}\) and \(\bar{x}+t_{\alpha/2}\frac{s}{\sqrt{n}}\).
What will you do if you cannot use the tinterval? What do we do when the above conditions are not satisfied?

If you do not know if the distribution comes from a normally distributed population and the sample size is small (i.e \(n<30\)), you can use the Normal Probability Plot to check if the data come from a normal distribution.

You may want to consider what is known as nonparametric statistical methods. A procedure such as the onesample Wilcoxon procedure. Lesson 11 introduces nonparametric statistical methods.

Minitab^{®}
Construct a CI using Minitab
Find the CI for a population mean in Minitab:
 In Minitab choose Stat> Basic Statistics > 1Sample t.
 From the drop down box select the Summarized data option button. (If you have the raw data you would use the default drop down of One or more samples, each in a column.)
 Enter the sample size, sample mean, and sample standard deviation in their respective text boxes.
 Click the Options button. The default confidence level is 95. If your desire another confidence level edit appropriately.
 Click OK and OK again.
4.6.2  The tdistribution
4.6.2  The tdistributionIn 1908, William Sealy Gosset from Guinness Breweries discovered the tdistribution. His penname was Student and thus it is called the "Student's tdistribution."
The tdistribution is different for different sample size, n. Thus, tables, as detailed as the standard normal table, are not provided in the usual statistics books. The graph below shows the tdistribution for degrees of freedom of 10 (blue) and 30 (red dashed).
Properties of the tdistribution
 t is symmetric about 0
 tdistribution is more variable than the Standard Normal distribution
 tdistributions are different for different degrees of freedom (d.f.).
 The larger \(n\) gets (or as \(n\) goes to infinity), the closer the \(t\)distribution is to the \(z\).
 The meaning of \(t_\alpha\) is the \(t\)value having the area "\(\alpha\)" to the right of it.
4.6.3 Checking Normality
4.6.3 Checking NormalityUsing Normal Probability Plot to Check Normality
If the sample size is less than 30, one needs to use a Normal Probability Plot to check whether the assumption that the data come from a normal distribution is valid.
 Normal Probability Plot
 The Normal Probability Plot is a graph that allows us to assess whether or not the data comes from a normal distribution.
This plot should be used as a guide for us to assess if the assumption that the data come from a normal distribution is valid or not. It should not be used to “test” an assumption.
4.6.4  Sample Size Computation
4.6.4  Sample Size ComputationSample Size Computation for the Population Mean Confidence Interval
Recall that a \((1\alpha)\)100% confidence interval for \(\mu\) is \(\bar{x}\pm t_{\alpha/2}\dfrac{s}{\sqrt{n}}\) where the multiplier \(t\) has a tdistribution with \(df = n  1\). Thus, the margin of error, E, is equal to:
\(E=t_{\alpha/2}\dfrac{s}{\sqrt{n}}\)
To determine the sample size, one first decides the confidence level and the half width of the interval one wants. Then we can find the sample size to yield an interval with that confidence level and with a half width not more than the specified one. The crude method to find the sample size: \(n=\left(\dfrac{z_{\alpha/2}\sigma}{E}\right)^2\) Then round up to the next whole integer.
The Iterative Method
A more accurate method to estimate the sample size: iteratively evaluate the formula since the t value also depends on n.
\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2\)
Use the example above for illustration. Start with an initial guess for $n$, plug in the formula, and iteratively solve for \(n\).
If the initial guess for \(n\) is 20, \(t_{0.05} = 1.729\) and degrees of freedom = 19,
\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2=n=\left(\dfrac{1.729(400)}{120}\right)^2=33.21\)
For \(n = 34\), degree of freedom = 33, and \(t_{0.05} = 1.697\)
\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2=n=\left(\dfrac{1.697(400)}{120}\right)^2=31.99\)
If we use \(n = 32\), the result is the same. Thus, the more accurate answer to the example is to sample 32 students.