3.4 Hypothesis Tests for Means

In the confidence intervals for means chapter, we introduced the \(t\)-distribution as a mathematical model for the sampling distribution of means. In this chapter, we use the \(t\)-distribution to conduct hypothesis tests for a single mean, the difference between two independent means, and the mean of paired differences.

Key Concepts

  • Distinguish between separate samples and paried data when comparing two means
  • Recognize when a \(t\)-distribution is an appropriate model for a distribution of sample means, difference in means between two populations, and the mean of paired differences.
  • Use a \(t\)-distribution, when appropriate, to test a hypothesis for a population mean, difference in means between two populations, and the mean of paired differences.

The \(t\)-test framework

As a reminder from testing a single and the difference of two proportions, every hypothesis test follows the same five-step structure whether we use simulation of a mathematical model:

  1. Check conditions for the test. Verify that the mathematical model is appropriate.
  2. State the hypotheses. Write out \(H_0\) (null hypothesis) and \(H_A\) (alternative hypothesis).
  3. Compute the test statistic, Calculate how far the observed data are from what \(H_0\) predicts. For hypothesis tests for means, we will use the \(t\)-test statistic.
  4. Find the p-value. Determine how unusual the test statistic is, assuming \(H_0\) is true.
  5. Draw a conclusion. Compare the p-value to the discernibility level, \(\alpha\), and state and interpret the conclusion in context.

Hypothesis test for a single mean

Remember, \(t_{n - 1}\) means a \(t\)-distribution with \(n - 1\) degrees of freedom

Provided that the sample size is large enough (\(n \ge 30\)) or the population is approximately normal, then according to the CLT

\[ t = \frac{ \overline{x} - \mu }{ s / \sqrt{n}} \sim t_{n - 1}. \]

We can use this fact to conduct a hypothesis test. As with the hypothesis test we have discussed thus far, there are a specific set of steps to conduct a hypothesis test using the CLT.

Step 1: Check conditions for the test

We can only use the \(t\)-distribution for confidence intervals if

  • \(n \ge 30\) or
  • the population is approximately normal.

Check whether either \(n \ge 30\) or the population is approximately normal.

Step 2: State the hypotheses

For a single average, the null hypothesis always has the form

\[ H_0: \mu = \mu_0 \]

where \(\mu_0\) is a number that represents the averages claimed or status quo value. The alternative hypothesis has one of the following three forms:

\[ \begin{aligned} H_A{:} & \hspace{.5em} \mu < \mu_0\\ H_A{:} & \hspace{.5em} \mu > \mu_0\\ H_A{:} & \hspace{.5em} \mu \neq \mu_0 \end{aligned} \]

Step 3: Calculate the test statistic

To conduct the hypothesis test using the CLT, we use a standardized test statistic of

\[ t = \frac{ \overline{x} - \mu_0 }{s / \sqrt{n}} \]

which follows a \(t_{n-1}\) distribution.

Step 4: Find the \(p\)-value

To find the \(p\)-value, you must use technology to find what proportion of the \(t\)-distribution is more extreme than the test statistic (in the direction of the alternative hypothesis). If your alternative is two-sided, then you multiply the one-sided \(p\)-value by 2.

Step 5: State your decision and interpret in the context of the hypotheses

  • If \(p\)-value \(< \alpha\), we reject \(H_0\) and have discernible evidence to suggest that \(H_A\) is correct.
  • If \(p\)-value \(\ge \alpha\), we fail to reject \(H_0\) and do not have discernible evidence to suggest that the alternative hypothesis is correct.

You should always write your interpretation in the context of the original hypothesis.

How to draw a sketch to illustrate the \(p\)-value

Class Example 3.4.1: How much is left?!

Have you ever been frustrated because you could not get a container of some sort to release the last bit of its contents? The article “Shake, Rattle, and Squeeze: How Much is Left in That Container?” (Consumer Reports, May 2009: 8) reported on an investigation of this issue for various consumer products. In a random sample of five 6.0 ounce tubes of toothpaste from a particular brand and squeeze them until no more toothpaste will come out. Then each tube is cut open and the amount remaining is weighed. For this sample, the mean and standard deviation of the amount of toothpaste remaining (in ounces) was 0.502 and 0.102, respectively. Suppose the toothpaste manufacturer claims that it’s packaging allows at least 90% of its contents to be released. Conduct a hypothesis test (using \(\alpha = 0.05\)) to test the manufacturer’s claim. You may assume that the remaining amounts of toothpaste are approximately normally distributed.

  1. Define the relevant parameter(s) and state the null and alternative hypotheses. Be sure to check any relevant conditions.
  1. What is the test statistic.
  1. Find the \(p\)-value and give a sketch to illustrate your \(p\)-value.
  1. State your decision and interpret your findings in the context of the study.

Class Example 3.4.2: Ski Patrol: Avalanches

Snow avalanches can be a real problem for travelers in the western United States and Canada. A very common type of avalanche is called the slab avalanche. These have been studied extensively by David McClung, a professor of civil engineering at the University of British Columbia. Slab avalanches studied in Canada had an average thickness of 67 (in cm) (Avalanche Handbook, by David McClung and P. Schaerer.) The ski patrol at Vail, Colorado, is studying slab avalanches in their region. A random sample of avalanches in spring gave the following thicknesses (in cm).

59 51 76 38 65 54 49 62 68 55 64 67 63 74 65 79

Assuming that slab thickness has an approximately normal distribution, is there evidence that the slab thickness in the Vail region differs from that in Canada? You may either us a 95% confidence interval or a hypothesis test (use \(\alpha = 0.05\)) to support your conclusion.

Hypothesis test for a difference in means from independent samples

Each sample must satisfy the necessary conditions for averages.

Provided that for each group the sample size is large enough (\(n \ge 30\)) or the population is approximately normal, then according to the CLT

\[ t = \frac{ \overline{x}_1 - \overline{x}_2 }{ \sqrt{ \frac{ s_1^2 }{ n_1 } + \frac{ s_2^2 }{ n_2 }}} \]

follows a \(t\)-distribution with d.f. equal to \(n_1 - n_2 - 2\).

We can use this fact to conduct a hypothesis test.

Step 1: Check conditions for the test

Check that for both groups \(n \ge 30\) or the population is approximately normal.

Step 2: State the hypotheses

For a difference in averages, the null hypothesis always has the form

\[ H_0: \mu_1 - \mu_2 = 0 \]

The alternative hypothesis has one of the following three forms:

\[ \begin{aligned} H_A{:} & \hspace{.5em} \mu_1 - \mu_2 < 0\\ H_A{:} & \hspace{.5em} \mu_1 - \mu_2 > 0\\ H_A{:} & \hspace{.5em} \mu_1 - \mu_2 \neq 0 \end{aligned} \]

Step 3: Calculate the test statistic

To conduct the hypothesis test using the CLT, we use a standardized test statistic of

\[ t = \frac{ \overline{x}_1 - \overline{x}_2 }{ \sqrt{ \frac{ s_1^2 }{ n_1 } + \frac{ s_2^2 }{ n_2 }}} \]

which follows a \(t\)-distribution with \(n_1+n_2-2\) degrees of freedom.

Step 4: Find the \(p\)-value and give a sketch to illustrate the \(p\)-value

To find the \(p\)-value, you must use technology to find what proportion of the standard normal distribution is more extreme than the test statistic (in the direction of the alternative hypothesis). If your alternative is two-sided, then you multiply the one-sided \(p\)-value by 2. The sketch that you give should be the same as the sketch for a single mean; however, you do not need to give the degrees of freedom.

Step 5: State your decision and interpret in the context of the hypotheses

  • If \(p\)-value \(< \alpha\) we reject \(H_0\) and have discernible evidence to suggest that the alternative hypothesis is correct.
  • If \(p\)-value \(\ge \alpha\), we fail to reject \(H_0\) and do not have discernible evidence to suggest that the alternative hypothesis is correct.

You should always write your interpretation in the context of the original hypothesis.

Class Example 3.4.3: Tire lifetimes

A large automobile manufacturing company is trying to decide whether to purchase Goodyear or Firestone tires for its new models. They believe that Firestone tires might have a longer lifetime. To help arrive at a decision, an experiment is conducted where tires are run until they wear out. A random sample of 55 Goodyear tires gave a mean lifetime of 40,900 miles with a standard deviation of 3,200 miles. A random sample of 40 Firestone tires gave a mean lifetime of 42,800 miles and a standard deviation of 2,700 miles. Using a 1% discernibility level, determine if Firestone tires have a larger population mean lifetime.

  1. Define the relevant parameter(s) and state the null and alternative hypotheses. Be sure to check any relevant conditions.
  1. What is the test statistic.
  1. Find the \(p\)-value and give a sketch to illustrate your \(p\)-value.
  1. State your decision and interpret your findings in the context of the study.

Class Example 3.4.4: Caffeine amounts revisited

The summary statistics from the amount of caffeine in coffee example are given in the table below.

Summary statistics for the amoung of caffeine in one-pound of coffee for two brands.
\(n\) \(\overline{x}\) \(s\)
Brand I 15 80mg 5mg
Brand II 12 77mg 6mg

Conduct a hypothesis test to see if there is a difference between the average amount of caffiene for the two brands (use \(\alpha = 0.05\)). Do the findings from your hypothesis test agree with your confidence interval from Example 3.3.6?

Class Activity: Memorization Group Activity 2

Hypothesis test for an average difference

When data are paired (\(d_i = x_{1,i} - x_{2,i}\)), provided that the sample size is large enough so that \(n_d \ge 30\) or the population is approximately normal, then according to the CLT

\[ t = \frac{ \overline{x}_d }{ s_d / \sqrt{ n_d } } \]

follows a \(t\)-distribution with \(n_d - 1\) degrees of freedom.

We can use this fact to conduct a hypothesis test. As with the hypothesis test we have discussed thus far, there are a specific set of steps to conduct a hypothesis test using the CLT.

Step 1: Check conditions for the test

Check whether \(n_d \ge 30\) or the population of differences is approximately normal.

Step 2: State the hypotheses

For a difference in averages, the null hypothesis always has the form

\[ H_0: \mu_d = 0 \]

The alternative hypothesis has one of the following three forms:

\[ \begin{aligned} H_A{:} & \hspace{.5em} \mu_d < \mu_0\\ H_A{:} & \hspace{.5em} \mu_d > \mu_0\\ H_A{:} & \hspace{.5em} \mu_d \neq \mu_0 \end{aligned} \]

Step 3: Calculate the test statistic

To conduct the hypothesis test using the CLT, we use a standardized test statistic of

\[ t = \frac{ \overline{x}_d }{ s_d / \sqrt{ n_d } } \]

which follows a \(t\)-distribution with \(n_d - 1\) degrees of freedom.

Step 4: Find the \(p\)-value and give a sketch to illustrate the \(p\)-value

To find the \(p\)-value, you must use technology to find what proportion of the \(t\)-distribution is more extreme than the test statistic (in the direction of the alternative hypothesis). If your alternative is two-sided, then you multiply the one-sided \(p\)-value by 2. The sketch is the same as for a single mean.

Step 5: State your decision and interpret in the context of the hypotheses

  • If \(p\)-value \(< \alpha\), we reject \(H_0\) and have discernible evidence to suggest that the alternative hypothesis is correct.
  • If \(p\)-value \(\ge \alpha\), we fail to reject \(H_0\) and do not have discernible evidence to suggest that the alternative hypothesis is correct.

You should always write your interpretation in the context of the original hypothesis.

One advantage of conducting a study using paired observations is that it can greatly reduce variation over independent samples and produce a much more powerful test (i.e. reject the null when you should be) and a more precise confidence interval estimate of the population mean difference. This reduction in variation is greatest when the underlying measurements vary greatly from pair to pair, but the differences do not.

Class Example 3.4.5: Sales

A company wants to know if attending a course on “how to be a successful salesperson” can increase the average sales of its employees. The company sent 6 of its salespeople to attend this course. The following gives the one-week sales of these employees before and after they attended the course. Determine if the course increases sales using a 5% significance level. What conditions/assumptions are necessary for the test to be valid?

Sales of employees before and after they attended the course.
Before 12 18 25 9 14 16
After 18 24 24 14 19 20

Practical vs. statistical discernibility

Statistical discernibility \(\neq\) practical importance.

A result is statistically discernible if the \(p\)-value is below the chosen discernibility level \(\alpha\). But statistical discernibility only means the observed effect is unlikely to be due to chance alone. It says nothing about whether the effect is large enough to matter in practice.

With very large samples, even trivially small differences can be statistically discernible. With very small samples, even large differences may not be statistically discernible (due to low power).

Summary

This chapter presented hypothesis tests for means using the \(t\)-distribution:

  • One-sample \(t\)-test: Tests whether a population mean \(\mu\) equals a hypothesized value \(\mu_0\). Test statistic: \(T = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}\) with \(df = n - 1\).
  • Two-sample \(t\)-test: Tests whether two population means are equal. Test statistic: \(T = \frac{(\bar{x}_1 - \bar{x}_2)}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}\) with \(df = n_1 + n_2 - 2\).
  • Paired \(t\)-test: Tests whether the mean of paired differences equals zero. Compute differences first, then apply the one-sample \(t\)-test to the differences: \(T = \frac{\bar{x}_{diff}}{s_{diff}/\sqrt{n_{diff}}}\) with \(df = n_{diff} - 1\).
  • All three tests require independence and approximate normality or large sample size.
  • Statistical discernibility (small p-value) does not imply practical importance (large enough to matter).