# Hypothesis Test for a Mean

This lesson explains how to conduct a hypothesis test of a mean, when the following conditions are met:

- The sampling method is simple random sampling.
- The sampling distribution is normal or nearly normal.

Generally, the sampling distribution will be approximately normally distributed if any of the following conditions apply.

- The population distribution is normal.
- The population distribution is symmetric, unimodal, without outliers, and the sample size is 15 or less.
- The population distribution is moderately skewed, unimodal, without outliers, and the sample size is between 16 and 40.
- The sample size is greater than 40, without outliers.

This approach consists of four steps: (1) state the hypotheses, (2) formulate an analysis plan, (3) analyze sample data, and (4) interpret results.

## State the Hypotheses

Every hypothesis test requires the analyst to state a null hypothesis and an alternative hypothesis. The hypotheses are stated in such a way that they are mutually exclusive. That is, if one is true, the other must be false; and vice versa.

The table below shows three sets of hypotheses. Each makes a statement about how
the population mean μ is related to a specified
value *M*. (In the table, the symbol ≠ means " not equal to ".)

Set | Null hypothesis | Alternative hypothesis | Number of tails |
---|---|---|---|

1 | μ = M | μ ≠ M | 2 |

2 | μ > M |
μ < M | 1 |

3 | μ < M |
μ > M | 1 |

The first set of hypotheses (Set 1) is an example of a two-tailed test, since an extreme value on either side of the sampling distribution would cause a researcher to reject the null hypothesis. The other two sets of hypotheses (Sets 2 and 3) are one-tailed tests, since an extreme value on only one side of the sampling distribution would cause a researcher to reject the null hypothesis.

## Formulate an Analysis Plan

The analysis plan describes how to use sample data to accept or reject the null hypothesis. It should specify the following elements.

- Significance level. Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.
- Test method. Use the one-sample t-test to determine whether the hypothesized mean differs significantly from the observed sample mean.

## Analyze Sample Data

Using sample data, conduct a one-sample t-test. This involves finding the standard error, degrees of freedom, test statistic, and the P-value associated with the test statistic.

- Standard error. Compute the
standard error (SE)
of the sampling distribution.
SE = s * sqrt{ ( 1/n ) * [ ( N - n ) / ( N - 1 ) ] }

where*s*is the standard deviation of the sample, N is the population size, and*n*is the sample size. When the population size is much larger (at least 20 times larger) than the sample size, the standard error can be approximated by:SE = s / sqrt( n )

- Degrees of freedom. The degrees of freedom (DF) is equal to the sample size (n) minus one. Thus, DF = n - 1.
- Test statistic. The test statistic is a t statistic (t) defined by
the following equation.
t = (x - μ) / SE

where x is the sample mean, μ is the hypothesized population mean in the null hypothesis, and SE is the standard error. - P-value. The P-value is the probability of observing a sample statistic as extreme as the test statistic. Since the test statistic is a t statistic, use the t Distribution Calculator to assess the probability associated with the t statistic, given the degrees of freedom computed above. (See sample problems at the end of this lesson for examples of how this is done.)

## Sample Size Calculator

As you probably noticed, the process of hypothesis testing can be complex. When you need to test a hypothesis about a mean score, consider using the Sample Size Calculator. The calculator is fairly easy to use, and it is free. You can find the Sample Size Calculator in Stat Trek's main menu under the Stat Tools tab. Or you can tap the button below.

Sample Size Calculator## Interpret Results

If the sample findings are unlikely, given the null hypothesis, the researcher rejects the null hypothesis. Typically, this involves comparing the P-value to the significance level, and rejecting the null hypothesis when the P-value is less than the significance level.

## Test Your Understanding

In this section, two sample problems illustrate how to conduct a hypothesis test of a mean score. The first problem involves a two-tailed test; the second problem, a one-tailed test.

**Problem 1: Two-Tailed Test**

An inventor has developed a new, energy-efficient lawn mower engine. He claims that the engine will run continuously for 5 hours (300 minutes) on a single gallon of regular gasoline. From his stock of 2000 engines, the inventor selects a simple random sample of 50 engines for testing. The engines run for an average of 295 minutes, with a standard deviation of 20 minutes. Test the null hypothesis that the mean run time is 300 minutes against the alternative hypothesis that the mean run time is not 300 minutes. Use a 0.05 level of significance. (Assume that run times for the population of engines are normally distributed.)

*Solution:* The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:

**State the hypotheses.**The first step is to state the null hypothesis and an alternative hypothesis.Null hypothesis: μ = 300

Alternative hypothesis: μ ≠ 300

Note that these hypotheses constitute a two-tailed test. The null hypothesis will be rejected if the sample mean is too big or if it is too small.**Formulate an analysis plan**. For this analysis, the significance level is 0.05. The test method is a one-sample t-test.**Analyze sample data**. Using sample data, we compute the standard error (SE), degrees of freedom (DF), and the t statistic test statistic (t).SE = s / sqrt(n) = 20 / sqrt(50) = 20/7.07 = 2.83

DF = n - 1 = 50 - 1 = 49

t = (x - μ) / SE = (295 - 300)/2.83 = -1.77

where s is the standard deviation of the sample, x is the sample mean, μ is the hypothesized population mean, and n is the sample size.

Since we have a two-tailed test, the P-value is the probability that the t statistic having 49 degrees of freedom is less than -1.77 or greater than 1.77. We use the t Distribution Calculator to find P(t < -1.77) is about 0.04.

- If you enter 1.77 as the sample mean in the t Distribution Calculator, you will find the that the P(t < 1.77) is about 0.04. Therefore, P(t > 1.77) is 1 minus 0.96 or 0.04. Thus, the P-value = 0.04 + 0.04 = 0.08.

**Interpret results**. Since the P-value (0.08) is greater than the significance level (0.05), we cannot reject the null hypothesis.

**Note:** If you use this approach on an exam, you may also want to mention
why this approach is appropriate. Specifically, the approach is
appropriate because the sampling method was simple random sampling,
the population was normally distributed, and the sample size was small relative to the
population size (less than 5%).

**Problem 2: One-Tailed Test**

Bon Air Elementary School has 1000 students. The principal of the school thinks that the average IQ of students at Bon Air is at least 110. To prove her point, she administers an IQ test to 20 randomly selected students. Among the sampled students, the average IQ is 108 with a standard deviation of 10. Based on these results, should the principal accept or reject her original hypothesis? Assume a significance level of 0.01. (Assume that test scores in the population of engines are normally distributed.)

*Solution:* The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:

**State the hypotheses.**The first step is to state the null hypothesis and an alternative hypothesis.Null hypothesis: μ >= 110

Alternative hypothesis: μ < 110

Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected if the sample mean is too small.**Formulate an analysis plan**. For this analysis, the significance level is 0.01. The test method is a one-sample t-test.**Analyze sample data**. Using sample data, we compute the standard error (SE), degrees of freedom (DF), and the t statistic test statistic (t).SE = s / sqrt(n) = 10 / sqrt(20) = 10/4.472 = 2.236

DF = n - 1 = 20 - 1 = 19

t = (x - μ) / SE = (108 - 110)/2.236 = -0.894

where s is the standard deviation of the sample, x is the sample mean, μ is the hypothesized population mean, and n is the sample size.

Here is the logic of the analysis: Given the alternative hypothesis (μ < 110), we want to know whether the observed sample mean is small enough to cause us to reject the null hypothesis.

The observed sample mean produced a t statistic test statistic of -0.894. We use the t Distribution Calculator to find P(t < -0.894) is about 0.19.

- This means we would expect to find a sample mean of 108 or smaller in 19 percent of our samples, if the true population IQ were 110. Thus the P-value in this analysis is 0.19.

**Interpret results**. Since the P-value (0.19) is greater than the significance level (0.01), we cannot reject the null hypothesis.