# 8.3: Testing a Mean Hypothesis

**At Grade**Created by: CK-12

## Learning Objectives

- Calculate the sample test statistic to evaluate a hypothesis about a population mean based on large samples.
- Differentiate the difference in hypothesis testing for situations with small populations and use the Student’s t-distribution accordingly.
- Understand the results of the hypothesis test and how the terms ‘statistically significant’ and ‘not statistically significant’ apply to the results.

## Introduction

In the previous sections, we have covered:

- the reasoning behind hypothesis testing.
- how to conduct single and two-tailed hypothesis tests.
- the potential errors associated with hypothesis testing.
- how to test hypotheses associated with population proportions.

In this section we will take a closer look at some examples that will give us a bit of practice in conducting these tests and what these results really mean. In addition, we will also look at how the terms **statistically significant** and **not statistically significant** apply to these results.

Also, it is important to look at what happens when we have a small sample size. All of the hypotheses that we have examined thus far have assumed that we have normal distributions. But what happens when we have a small sample size and are unsure if our distribution is normal or not? We use something called the Student’s t-distribution to take small sample size into account.

## Evaluating Hypotheses for Population Means using Large Samples

When testing a hypothesis for a normal distribution, we follow a series of four basic steps:

- State the null and alternative hypotheses.
- Set the criterion (critical values) for rejecting the null hypothesis.
- Compute the test statistic.
- Decide about the null hypothesis and interpret our results.

In Step 4, we can make one of two decisions regarding the null hypothesis.

- If the test statistic falls in the regions above or below the critical values (meaning that it is far from the mean), we can reject the null hypothesis.
- If the test statistics falls in the area between the critical values (meaning that it is close to the mean) we fail to reject the null hypothesis.

When we reject the null hypothesis we are saying that the difference between the observed sample mean and the hypothesized population mean is too great to be attributed to chance. If we reject the null hypothesis, we are also saying that the probability that the observed sample mean will have occurred by chance is less than the ? level of \begin{align*}.05, .01\end{align*} or whatever we decide.

When we fail to reject the null hypothesis, we are saying that the difference between the observed sample mean and the hypothesized population mean is probable if the null hypothesis is true. This decision is based on the properties of sampling and the fact that there is not a large difference is reason to not reject the null hypothesis. Essentially, we are willing to attribute this difference to sampling error.

Let’s perform a hypothesis test for the scenarios we examined in the first lesson.

**Example:**

College A has an average SAT score of \begin{align*}1500.\end{align*} From a random sample of \begin{align*}125\end{align*} freshman psychology students we find the average SAT score to be \begin{align*}1450\end{align*} with a standard deviation of \begin{align*}100\end{align*}. Is the sample of freshman psychology students representative of the overall population?

**Solution:**

Let’s first develop our null and alternative hypotheses:

\begin{align*}& H_{0}: \mu=1500 \\ & H_{a}: \mu\neq 1500\end{align*}

At a \begin{align*}0.05\end{align*} significance level, our critical values would be \begin{align*}1.96\end{align*} standard deviations above and below the mean.

Next, we calculate the standard \begin{align*}z-\end{align*}score for the sample of freshman psychology students.

\begin{align*}z = \frac{X - \mu} {\sigma_x} = \frac{1500 - 1450} {100 \sqrt{125}} \approx 5.59\end{align*}

Since the calculated \begin{align*}z\end{align*}-score of \begin{align*}5.59\end{align*} falls in the critical region (as defined by a \begin{align*}0.05\end{align*} significance level or anything with a \begin{align*}z\end{align*}-score of above \begin{align*}1.96\end{align*}) we reject the null hypothesis. Therefore, we can conclude that the probability of obtaining a sample mean equal to \begin{align*}1450\end{align*} if the mean of the population is \begin{align*}1500\end{align*} is very small and the sample of freshman psychology students is not representative of the overall population. Furthermore, the probability of this difference occurring by chance is less than \begin{align*}0.05.\end{align*}

**Example:**

The school nurse was wondering if the average height of 7th graders has been increasing. Over the last \begin{align*}5\;\mathrm{years}\end{align*}, the average height of a 7th grader was \begin{align*}145\;\mathrm{cm}\end{align*} with a standard deviation of \begin{align*}20\;\mathrm{cm.}\end{align*} The school nurse takes a random sample of \begin{align*}200\end{align*} students and finds that the average height this year is \begin{align*}147\;\mathrm{cm.}\end{align*} Conduct a single-tailed hypothesis test using a \begin{align*}0.05\end{align*} significance level to evaluate the null and alternative hypotheses.

**Solution:**

First, we develop our null and alternative hypotheses:

\begin{align*}& H_{0}:\mu=145 \\ & H_{a}:\mu\neq 145\end{align*}

At a \begin{align*}0.05\end{align*} single-tailed significance level, our critical value for a single-tailed test would be \begin{align*}1.64\end{align*} standard deviations above the mean.

Next, we calculate the standard \begin{align*}z\end{align*}-score for the sample of 7th graders.

\begin{align*}z = \frac{X - \mu} {\sigma_X} = \frac{147 - 145} {20 \sqrt{200}} \approx 1.41\end{align*}

Since the calculated \begin{align*}z\end{align*}-score of \begin{align*}1.41\end{align*} does not fall in the critical region (as defined by a \begin{align*}0.05\end{align*} significance level or anything with a \begin{align*}z\end{align*}-score of above \begin{align*}1.67\end{align*}) we fail to reject the null hypothesis. We can conclude that the probability of obtaining a sample mean equal to \begin{align*}147\end{align*} if the mean of the population is \begin{align*}145\end{align*} is likely to have been due to chance.

## Hypothesis Testing with Small Populations and Sample Sizes

Back in the early 1900’s a chemist at a brewery in Ireland discovered that when he was working with very small samples, the distributions of the mean differed significantly from the normal distribution. He noticed that as his sample sizes changed, the shape of the distribution changed as well. He published his results under the pseudonym ‘Student’ and this concept and the distributions for small sample sizes are now known as “Student’s \begin{align*}t\end{align*}-distributions.”

**T-distributions** are a family of distributions that, like the normal distribution, are symmetrical and bell-shaped and centered on a mean. However, the distribution shape changes as the sample size changes. Therefore, there is a specific shape or distribution for every sample of a given size (see figure below; each distribution has a different value of \begin{align*}k\end{align*}, the number of degrees of freedom, which is \begin{align*}1\end{align*} less than the size of the sample).

We use the Student's \begin{align*}t\end{align*}-distribution in hypothesis testing the same way that we use the normal distribution. Each row in the \begin{align*}t\end{align*}-distribution table (see excerpt below) represents a different \begin{align*}t\end{align*}-distribution and each distribution is associated with a unique number of degrees of freedom (the number of observations minus one). The column headings in the table represent the portion of the area in the tails of the distribution – we use the numbers in the table just as we used the \begin{align*}z\end{align*}-scores. Below is an excerpt from the Student's \begin{align*}t\end{align*}-table for one-sided critical values.

DF | Probability of Exceeding the Critical Value | |||||
---|---|---|---|---|---|---|

\begin{align*}0.10\end{align*} | \begin{align*}0.05\end{align*} | \begin{align*}0.025\end{align*} | \begin{align*}0.01\end{align*} | \begin{align*}0.005\end{align*} | \begin{align*}0.001\end{align*} | |

1 | \begin{align*}3.078\end{align*} | \begin{align*}6.314\end{align*} | \begin{align*}12.706\end{align*} | \begin{align*}31.821\end{align*} | \begin{align*}63.657\end{align*} | \begin{align*}318.313\end{align*} |

2 | \begin{align*}1.886\end{align*} | \begin{align*}2.920\end{align*} | \begin{align*}4.303\end{align*} | \begin{align*}6.965\end{align*} | \begin{align*}9.925\end{align*} | \begin{align*}22.327\end{align*} |

3 | \begin{align*}1.638\end{align*} | \begin{align*}2.353\end{align*} | \begin{align*}3.182\end{align*} | \begin{align*}4.541\end{align*} | \begin{align*}5.841\end{align*} | \begin{align*}10.215\end{align*} |

4 | \begin{align*}1.533\end{align*} | \begin{align*}2.132\end{align*} | \begin{align*}2.776\end{align*} | \begin{align*}3.747\end{align*} | \begin{align*}4.604\end{align*} | \begin{align*}7.173\end{align*} |

5 | \begin{align*}1.476\end{align*} | \begin{align*}2.015\end{align*} | \begin{align*}2.571\end{align*} | \begin{align*}3.365\end{align*} | \begin{align*}4.032\end{align*} | \begin{align*}5.893\end{align*} |

6 | \begin{align*}1.440\end{align*} | \begin{align*}1.943\end{align*} | \begin{align*}2.447\end{align*} | \begin{align*}3.143\end{align*} | \begin{align*}3.707\end{align*} | \begin{align*}5.208\end{align*} |

7 | \begin{align*}1.415\end{align*} | \begin{align*}1.895\end{align*} | \begin{align*}2.365\end{align*} | \begin{align*}2.998\end{align*} | \begin{align*}3.499\end{align*} | \begin{align*}4.782\end{align*} |

8 | \begin{align*}1.397\end{align*} | \begin{align*}1.860\end{align*} | \begin{align*}2.306\end{align*} | \begin{align*}2.896\end{align*} | \begin{align*}3.355\end{align*} | \begin{align*}4.499\end{align*} |

9 | \begin{align*}1.383\end{align*} | \begin{align*}1.833\end{align*} | \begin{align*}2.262\end{align*} | \begin{align*}2.821\end{align*} | \begin{align*}3.250\end{align*} | \begin{align*}4.296\end{align*} |

10 | \begin{align*}1.372\end{align*} | \begin{align*}1.812\end{align*} | \begin{align*}2.228\end{align*} | \begin{align*}2.764\end{align*} | \begin{align*}3.169\end{align*} | \begin{align*}4.143\end{align*} |

As the number of observations gets larger, the \begin{align*}t\end{align*}-distribution approaches the shape of the normal distribution. In general, once the sample size is large enough - usually about \begin{align*}120\end{align*} - we would use the normal distribution or the \begin{align*}z\end{align*}-table instead.

In calculating the \begin{align*}t\end{align*}-test statistic, we use the formula:

\begin{align*}t = \frac{\bar{X} - \mu} {s_{\bar{x}}}\end{align*}

where:

\begin{align*}t =\end{align*} test statistic

\begin{align*}\bar{X}=\end{align*} sample mean

\begin{align*}\mu =\end{align*} hypothesized population mean

\begin{align*}s_{\bar{x}} =\end{align*} estimated standard error

To estimate the standard error \begin{align*}(s_{\bar{x}}\end{align*}, we use the formula \begin{align*}s/ \sqrt{n}\end{align*} where \begin{align*}s\end{align*} is the standard deviation of the sample and \begin{align*}n\end{align*} is the sample size.

**Example:**

The high school athletic director is asked if football players are doing as well academically as the other student athletes. We know from a previous study that the average GPA for the student athletes is \begin{align*}3.10\end{align*} and that the standard deviation of the sample is \begin{align*}0.54\end{align*}. After an initiative to help improve the GPA of student athletes, the athletic director samples \begin{align*}20\end{align*} football players and finds that their GPA is \begin{align*}3.18.\end{align*} Is there a significant improvement? Use a \begin{align*}.05\end{align*} significance level.

**Solution:**

First, we establish our null and alternative hypotheses.

\begin{align*}& H_{0}: \mu=3.10 \\ & H_{a}: \mu\neq 3.10\end{align*}

Next, we use our alpha level \begin{align*}(\alpha)\end{align*} of \begin{align*}.05\end{align*} and the \begin{align*}t\end{align*}-distribution table to find our critical values. For a two-tailed test with \begin{align*}19\;\mathrm{degrees}\end{align*} of freedom and a \begin{align*}.05\end{align*} level of significance, our critical values are equal to \begin{align*}2.093\end{align*} standard errors above and below the mean.

In calculating the test statistic, we use the formula:

\begin{align*}t = \frac{\bar{X} - \mu} {s_{\bar{x}}} = \frac{3.18 - 3.10} {0.54/ \sqrt{20}} \approx 0.66\end{align*}

This means that the observed sample mean \begin{align*}(3.18)\end{align*} of football players is \begin{align*}0.66\end{align*} standard errors above the hypothesized value of \begin{align*}3.10.\end{align*} Because \begin{align*}t = 0.66\end{align*} does not exceed \begin{align*}2.093\end{align*} (the standard critical value), the null hypothesis is not rejected.

Therefore, we can conclude that the difference between the sample mean and the hypothesized value is not sufficient to attribute it to anything other than sampling error. Thus, the athletic director can conclude that the mean academic performance of football players does not differ from the mean performance of other student athletes.

## How to Interpret the Results of a Hypothesis Test

In the previous section, we discussed how to interpret the results of a hypothesis test. As a reminder, when we reject the null hypothesis we are saying that the difference between the observed sample mean and the hypothesized population mean is too great to be attributed to chance. When we fail to reject the null hypothesis, we are saying that the difference between the observed sample mean and the hypothesized population mean is probable if the null hypothesis is true. Essentially, we are willing to attribute this difference to sampling error.

But what is meant by **statistical significance**? Technically, the difference between the hypothesized population mean and the sample mean is said to be *statistically significant* when the probability that the difference occurred by chance is less than the significance \begin{align*}(\alpha)\end{align*} level. Therefore, when the calculated test statistic (whether it is the \begin{align*}z\end{align*}- or the \begin{align*}t\end{align*}-score) falls in the area beyond the critical score, we say that the difference between the sample mean and the hypothesized population mean is **statistically significant.** When the calculated test statistic falls in the area between the critical scores we say that the difference between the sample mean and the hypothesized population mean is **not statistically significant.**

## Lesson Summary

1. When testing a hypothesis for the mean of a distribution, we follow a series of four basic steps:

- State the null and alternative hypotheses.
- Set the criterion (critical values) for rejecting the null hypothesis.
- Compute the test statistic.
- Decide about the null hypothesis and interpret our results.

2. When we reject the null hypothesis we are saying that the difference between the observed sample mean and the hypothesized population mean is too great to be attributed to chance.

3. When we fail to reject the null hypothesis, we are saying that the difference between the observed sample mean and the hypothesized population mean is probable if the null hypothesis is true.

4. We use the \begin{align*}t\end{align*}-distribution in hypothesis testing the same way that we use the normal distribution. However, the \begin{align*}t\end{align*}-distribution is used when the sample size is small (typically less than \begin{align*}120\end{align*}) and the population standard deviation is unknown.

5. When calculating the \begin{align*}t\end{align*}-statistic, we use the formula:

\begin{align*}t = \frac{\bar{X} - \mu} {s_{\bar{x}}}\end{align*}

where:

\begin{align*}t =\end{align*} test statistic

\begin{align*}\bar{X} = \end{align*} sample mean

\begin{align*}\mu=\end{align*} hypothesized population mean

\begin{align*}s_{\bar{x}} =\end{align*} estimated standard error, which is computed by \begin{align*}\frac{s} {\sqrt{n}}\end{align*}

6. The difference between the hypothesized population mean and the sample mean is said to be statistically significant when the probability that the difference occurred by chance is less than the significance \begin{align*}(\alpha)\end{align*} level.

## Review Questions

- In hypothesis testing, when we work with large samples (typically samples over \begin{align*}120\end{align*}), we use the ___ distribution. When working with small samples (typically samples under \begin{align*}120\end{align*}), we use the ___ distribution.
- True or False: When we fail to reject the null hypothesis, we are saying that the difference between the observed sample mean and the hypothesized population mean is probable if the null hypothesis is true.

The dean from UCLA is concerned that the student’s grade point averages have changed dramatically in recent years. The graduating seniors’ mean GPA over the last five years is \begin{align*}2.75\end{align*}. The dean randomly samples \begin{align*}256\end{align*} seniors from the last graduating class and finds that their mean GPA is \begin{align*}2.85\end{align*}, with a sample standard deviation of \begin{align*}0.65\end{align*}.

- What would the null and alternative hypotheses be for this scenario?
- What would the standard error be for this particular scenario?
- Describe in your own words how you would set the critical regions and what they would be at an alpha level of \begin{align*}.05\end{align*}.
- Test the null hypothesis and explain your decision
- Suppose that the dean samples only \begin{align*}30\end{align*} students. Would a \begin{align*}t\end{align*} -distribution now be the appropriate sampling distribution for the mean? Why or why not?
- Using the appropriate \begin{align*}t\end{align*}-distribution, test the same null hypothesis with a sample of \begin{align*}30.\end{align*}
- With a sample size of \begin{align*}30\end{align*}, do you need to have a
**larger**or**smaller**difference between then hypothesized population mean and the sample mean to obtain statistical significance? Explain your answer. - For each of the following scenarios, state which one is more likely to lead to the rejection of the null hypothesis.
- A one-tailed or two-tailed test
- \begin{align*}.05\end{align*} or \begin{align*}.01\end{align*} level of significance
- A sample size of \begin{align*}n = 144\end{align*} or \begin{align*}n = 444\end{align*}

## Review Answers

- \begin{align*}z, t\end{align*}
- True
- \begin{align*}H_{0}:\mu=2.75, H_{a}: \mu \neq 2.75\end{align*}
- \begin{align*}0.406\end{align*}
- When setting the critical regions for this hypothesis, it is important to consider the repercussions of the decision. Since there does not appear to be major financial or health repercussions of this decision, a more conservative alpha level need not be chosen. With an alpha level of \begin{align*}.05\end{align*} and a sample size of \begin{align*}256\end{align*}, we find the area under the curve associated in the \begin{align*}z\end{align*}-distribution and set the critical regions accordingly. With this alpha level and sample size, the critical regions are set at \begin{align*}1.96\end{align*} standard scores above and below the mean.
- With a calculated test statistic of \begin{align*}2.463\end{align*}, we reject the null hypothesis since it falls beyond the critical values established with an alpha level of \begin{align*}.05\end{align*}. This means that the probability that the observed sample mean would have occurred by chance if the null hypothesis is true is less than \begin{align*}5 \%\end{align*}.
- Yes, because the sample size is below \begin{align*}120\end{align*}, in most cases the \begin{align*}t\end{align*} -distribution would be the appropriate distribution to use and what you have is \begin{align*}s\end{align*} not \begin{align*}t\end{align*}.
- The critical values for this scenario using the \begin{align*}t\end{align*}-distribution are \begin{align*}2.045\end{align*} standard scores above and below the mean. With a calculated \begin{align*}t\end{align*}-test statistic of \begin{align*}0.8425\end{align*}, we do not reject the null hypothesis. Therefore, we can conclude that the probability that the observed sample mean could have occurred by chance if the null hypothesis was true is greater than \begin{align*}5 \%\end{align*}.
- You would need a larger difference because the standard error of the mean would be greater with a sample size of \begin{align*}30\end{align*} than with a sample size of \begin{align*}256\end{align*}.
- (a) one-tailed test (b) \begin{align*}.05\end{align*} level of significance (c) \begin{align*}n = 144\end{align*}