# 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 sample is drawn from a normal or near-normal population.

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

- The population distribution is normal.
- The sampling distribution is symmetric, unimodal, without outliers, and the sample size is 15 or less.
- The sampling 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 ) * ( 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 10 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-score (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-score, use the t Distribution Calculator to assess the probability associated with the t-score, given the degrees of freedom computed above. (See sample problems at the end of this lesson for examples of how this is done.)

## 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 of This Lesson

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.

## Sample Planning Wizard

As you probably noticed, the process of testing a hypothesis about a mean
score can be complex and time-consuming. Stat Trek's Sample Planning Wizard
can do the same job quickly, easily, and error-free. In addition to
conducting the hypothesis test, the Wizard creates a summary report
that lists key findings and documents analytical techniques.
Whenever you need to test a hypothesis, consider using the Sample Planning Wizard.
The Sample Planning Wizard is a premium tool available only to registered users.
**>**
Learn more

Register Now | View Demo | View Wizard |

**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. Suppose a simple random sample of 50 engines is tested. 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: μ ≠ 300Note 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-score 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.77where 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-score 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) = 0.04, and P(t > 1.77) = 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,
and the population was normally distributed.

**Problem 2: One-Tailed Test**

Bon Air Elementary School has 300 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.

*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: μ < 110Note 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-score 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.894where 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 one-tailed test, the P-value is the probability that the t-score having 19 degrees of freedom is less than -0.894.

We use the t Distribution Calculator to find P(t < -0.894) = 0.19. Thus, the P-value 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.

**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,
and the population was normally distributed.