Chapter 17 Hypothesis Tests: Means


Interactive Example: Large-Sample Hypothesis Test for a Mean

In this example, we examine the mechanics of a classical hypothesis test for a mean, when the sample is relatively large — say \(N>50.\)

At the top of the main panel, we are presented with the problem setup. A random sample from a variable \(Y\) has been drawn. We are given the sample mean and the sample variance. We then want to test a particular null hypothesis at a given level of statistical significance.

As with proportions, there are four components to a classical hypothesis test of a mean:

  1. State the null and alternative hypotheses.
  2. Calculate the test statistic. Here, we use the \(Z\) transformation of our sample mean \(\bar{Y}\).
  3. Determine the critical value \(z_{crit}\) associated with \(\alpha/2\) probability in each tail of a N(0,1) distribution.
  4. State the conclusion of the hypothesis test.

Click Show Another to generate another example.



Interactive Example: Small-Sample Hypothesis Test for a Mean

In this example, we examine the mechanics of a classical hypothesis test for a mean, when the sample is small — say \(N<50.\)

At the top of the main panel, we are presented with the problem setup. A random sample from a variable \(Y\) has been drawn. We are given the sample mean and the sample variance. We then want to test a particular null hypothesis at a given level of statistical significance.

As before (large samples), there are four components to a classical hypothesis test of a mean:

  1. State the null and alternative hypotheses.
  2. Calculate the test statistic. Here, we use the \(T\) transformation of our sample mean \(\bar{Y}\).
  3. Determine the critical value \(t_{crit}\) associated with \(\alpha/2\) probability in each tail of a t distribution with degrees of freedom \(df=N-1\).
  4. State the conclusion of the hypothesis test.

Click Show Another to generate another example.



Interactive Example: Hypothesis Tests using p-values

In this example, we use a statistic’s p-value to reach a conclusion in an hypothesis test.

At the top of the main panel, we are presented with the problem setup. A random sample from a variable \(Y\) has been drawn. It may be a large sample or a small sample. We are given the sample mean and the sample variance. We then want to test a particular null hypothesis. However, no level of significance \(\alpha\) is set ahead of time.

The steps in the hypothesis test are similar to what we’ve seen previously, with the exception that we no longer set \(\alpha\) ahead of time and use it to find the critical values for the test statistics. Instead, we calculate the p-value associated with a test statistic and then reach a conclusion using the p-value.

  1. State the null and alternative hypotheses.
  2. Calculate the test statistic: \(t\) for a small sample test; \(z\) for a large sample test.
  3. Calculate the p-value associated with the test statistic.
  4. State the conclusion of the hypothesis test.

R code is provided to demonstrate how to calculate p-values. The p-value is also represented in the graph below as the sum of the red shaded areas in the tails of the distribution.

Click Show Another to generate another example.



Practice Session: Hypothesis Tests

In this session, you will have the opportunity to answer questions concerning the material on hypothesis tests is this Chapter (means) as well as that in the previous Chapter (proportions):

  • Large-sample hypothesis test for a population mean
  • Small-sample hypothesis test for a population mean
  • Large-sample hypothesis test for a population proportion

You may be asked to conduct a classical hypothesis test at a particular level of significance \(\alpha\); or, you may be asked to calculate the p-value associated with your test statistic.

Enter your answers in the appropriate boxes. Then click Submit to receive feedback. Try eight or more problems, or until you feel comfortable conducting the above hypothesis tests. If you don’t understand the answer to a problem — e.g., how to calculate the test statistic or find the critical value — go back and review the apppropriate section.