Surviving Statistics

Chapter 12: ANOVA (Analysis of Variance)

Learn how F tests and analysis of variance compare population variances and three or more population means.

Start here

Overview

Learn how analysis of variance separates between-group and within-group variability to test whether three or more population means are equal.

What You Will Learn

  • Explain the purpose of the F distribution.
  • Compare two population variances with an F test.
  • State hypotheses for a one-way ANOVA.
  • Distinguish between-group and within-group variation.
  • Complete and interpret an ANOVA table.
  • Use the F statistic and p-value to make a decision about population means.

Before You Begin

  • One- and two-sample hypothesis testing.
  • Variance and standard deviation.
  • Null and alternative hypotheses, significance levels, and p-values.

Why This Matters

ANOVA allows several groups to be compared in one coherent test while controlling the risk created by performing many separate pairwise tests.

Plan Your Study

  • Read the written chapter and identify its main terms and procedures.
  • Watch the instructional videos and compare the worked examples.
  • Use the anova calculator to verify your calculations.
  • Complete the guided questions before attempting the challenge activities.
  • Review the study sheet and explain each conclusion in context.

Next step

Read the complete chapter.

The Learn tab contains the written lesson from Surviving Statistics.

Go to Learn

Written lesson

Learn Chapter 12: ANOVA (Analysis of Variance)

Learn how F tests and analysis of variance compare population variances and three or more population means.

Advertisement

ANOVA (Analysis of Variance)

This chapter in Surviving Statistics explains how to complete an Analysis of Variance when working with two populations or more than two samples.

Chapter Study Sheet

⬇
Printable Study Sheet Open or download

Instructional Videos

▶
Surviving Statistics: Analysis of Variance - ANOVA Watch video
▶
Business Statistics: Analysis of Variance - ANOVA Watch video
▶
Creating an ANOVA table in Excel Watch video

Surviving Statistics Chapter 12 - File Downloads

⬇
Patient Discharge Times ANOVA table Open or download

ANOVA (Analysis of Variance)

We use the ANOVA to compare the variance of two populations or to compare the means of more than two samples. We accomplish these two goals differently, but both will use a test statistic we have not yet used, the F statistic

Here are some attributes of the F distribution you should know: • The F distribution, like the T distribution uses degrees of freedom. • The F statistic will never equal a negative value, but it can be zero.

We will start this chapter with a comparison of two population variances and a simple formula to compute the F statistic. Then we will create a complete ANOVA table as we compare the means from three samples.

Comparing two population variances

Although it does not appear on every patient satisfaction survey, Keisha keeps running into one consistent complaint: the discharge process takes too long. Patients comment that the waiting time after the doctor releases them to when they can actually leave the hospital is too long. Keisha wants to compare the dispersion (variance) in times between patients released by their doctors before noon and those released after noon. She decided to compare the variances of these two populations. To do this, she surveyed a sample of 12 patients released in the morning and 9 patients released after noon. The results are as follows:

Statistics lesson screenshot 12thChapter1

Step 1: State the null and alternate hypothesis:

H0 Variance of morning releases = Variance of afternoon releases H1 Variance of morning releases <> Variance of afternoon releases

Step 2: Select the level of significance:

Keisha selects a .02 level of significance. This gives her a 2% chance of making a Type I error.

Step 3: Determine the test statistic:

Because Keisha is comparing the variances of these two populations, she will use the F distribution.

Step 4: Determine the critical value (decision rule):

This is a two-tail test because Keisha is checking both directions, which means Keisha is looking for .01 in each tail. Even though the F distribution does not support negative values, we will still treat this as a two-tail test.

The F distribution uses two degrees of freedom, one for the numerator and one for the denominator. The numerator will be the sample size of the sample with the largest variance, and the denominator is the size of the sample with the smallest variance.

The degrees of freedom for the numerator and the denominator are n – 1, so 11 for the numerator and 8 for the denominator. Locating the .01 table and the degrees of freedom for the numerator and denominator, the critical F value is 5.734.

Statistics lesson screenshot 12thChapter2

Step 5: Take a sample, compute the test statistic and make a decision

Keisha has already taken the sample, so the next step is to compute the F statistic. The formula to do this is:

Statistics lesson screenshot 12thChapter3

Keisha computes an F of 2.393. Since this F statistic is smaller than the critical value, Keisha does not reject the null hypothesis. Even though the variances appear to differ, she cannot conclude that is actually the case at the .02 significance level.

If Keisha is uneasy with these results, she could conduct another study with a larger sample size. Notice the critical values in the F table decrease substantially as the degrees of freedom increase. With a larger sample size, Keisha’s decision could be different.

Completing an ANOVA table – three or more means

The t test works well for comparing two sample means. However, it becomes very tedious to use the t statistic to compare three or more means. The ANOVA is a better approach. The final result of the ANOVA will be an F statistic that can be used to reject or not reject the null hypothesis. When we are comparing three or more means the null hypothesis is that the means are equal. The alternate is that at least one mean differs from the others. (Theoretically, we are testing if the means of the populations that the samples were taken from are equal.)

Software programs, like Excel and specialized statistical applications, make creating an ANOVA table quick and easy. However, we will step through the manual creation process first to help you better understand the values that the ANOVA table displays. We will also use ANOVA tables in upcoming chapters.

Before we begin the five-step hypothesis testing process, here is an illustration of an ANOVA table and the values we will be computing. This table will make more sense as we step through the process.

Statistics lesson screenshot 12thChapter4

Keisha is still interested in the time patients wait after being released by their doctor until they are actually discharged. She wants to compare the average (mean) waiting time for those released by their doctors in the morning, afternoon, and weekends. She wants to know if there is a statistically significant difference in the mean waiting times for these three patient populations.

To test her hypothesis, Keisha collects the following data:

Statistics lesson screenshot 12thChapter5

Step 1: State the null and alternate hypothesis:

H0 Mean morning = mean afternoon = mean weekend Or µ1 = µ2 = µ3 H1 All three means are not equal

Step 2: Select the level of significance:

Keisha will again select a .02 level of significance, giving her a 2% chance of making a Type I error.

Step 3: Determine the test statistic:

Keisha will construct an ANOVA table to compare the means of these three populations with the F distribution.

Step 4: Determine the critical value (decision rule):

This is a two-tail test because Keisha is checking both directions. This means we are looking for .01 in each tail. Even though the F distribution does not support negative values, we will still treat this as a two-tail test.

The degrees of freedom are determined as follows: Numerator = k – 1 = 3 – 1 = 2 k is the number of categories or populations, 3 in this case. Denominator are n – k = 31 – 3 = 28 n is the total of all three samples which is this case is 31.

The degrees of freedom for the numerator are 2 and the degrees of freedom for the denominator are 28. Locating the .01 table and the degrees of freedom for the numerator and denominator, the critical F value is 5.453.

Statistics lesson screenshot 12thChapter6

Step 5: Take a sample, compute the test statistic and make a decision

Keisha has already taken the sample, so the next step is to construct the ANOVA table and compute the F statistic.

The first step in creating the ANOVA is to create the grand mean, the mean of all the samples. For these samples, the grand mean is 47.613 (1476/31).

Statistics lesson screenshot 12thChapter7
Statistics lesson screenshot 12thChapter8

The next step is to compute the Sum of Squares Total (SS Total).

This is computed as:

Statistics lesson screenshot 12thChapter9

To compute SS Total, we subtract the grand mean from each value, square it and them sum all the squared differences for each sample.

Statistics lesson screenshot 12thChapter10

Completing the ANOVA table as we go, we can now fill it in as follows:

Statistics lesson screenshot 12thChapter11

The next step is to create the Sum of Squares Error.

Statistics lesson screenshot 12thChapter12

We compute this by taking each value in the sample and subtracting the treatment (sample) mean from that value. We then square the difference for each value and sum all the errors for each treatment (sample). Finally, as the term implies, SSE is the summed treatment (sample) errors.

Statistics lesson screenshot 12thChapter13

Once we have these two key values, SS Total and SSE, we can construct the rest of the ANOVA table with minimal calculations.

Having SS Total and SSE, we can easily compute SST with: SST = SS Total - SSE

All the other computations are based on SST and SSE. So, the completed table, including the F statistic is as follows:

Statistics lesson screenshot 12thChapter14

After constructing the ANOVA table and computing an F statistic of 6.046, Keisha can reject the null hypothesis because the F statistic she computed is larger than the critical F value of 5.734

All three of the means are not equal at the .02 level of significance. Essentially, Keisha can be at least 98% sure that the wait times in the morning, afternoon, and weekends are not the same.

Try it in Excel:

Excel’s data analysis add-in has the ANOVA single factor option that will create an ANOVA table and compute the F statistic for more than two samples.

Statistics lesson screenshot 12thChapter15

Be sure to set the correct Alpha level, which will be the level of significance / 2 because you are really doing a two tailed test.

Statistics lesson screenshot 12thChapter16

You should be able to understand these values after constructing an ANOVA manually. Notice that Excel names SST, “Between Groups”, and SSE “Within Groups”.

Statistics lesson screenshot 12thChapter17
Advertisement

Next step

See the concepts demonstrated.

Continue to Watch for chapter videos and worked examples.

Go to Watch

See it explained

Watch

Choose the explanation or example that best supports your learning.

Next step

Apply what you have learned.

Use the guided questions and interactive calculator activities in Practice.

Go to Practice

Apply what you learned

Practice Chapter 12: ANOVA (Analysis of Variance)

Apply the chapter procedures, interpret each result in context, and use the companion calculator to verify your work after attempting each problem.

Launch Interactive Calculator

Guided Practice

  • State the null and alternative hypotheses for comparing three means.
  • Explain the difference between within-group and between-group variation.
  • Identify the numerator and denominator of the F ratio conceptually.
  • Interpret an ANOVA p-value in context.
  • Explain why ANOVA does not by itself identify which means differ.

Challenge Yourself

  • Construct three groups with equal means but different within-group variation.
  • Construct three groups with similar within-group variation but clearly different means.
  • Explain why several independent t tests can inflate the overall Type I error rate.

Check Your Understanding

  • Why is the F statistic never negative?
  • What does a large F statistic suggest?
  • What assumptions support a one-way ANOVA?
  • What follow-up work may be needed after rejecting the null hypothesis?

Next step

Save the materials you may need later.

Open Resources for the study sheet, spreadsheets, and related learning materials.

Go to Resources

Keep learning

Resources

Study sheets, downloadable files, companion tools, and related lessons for this chapter.

For educators

Teaching this chapter?

The Instructor tab contains objectives, teaching ideas, assessments, and a printable guide.

Open Instructor Resources

LutherMaddy.com — Helping Humans Learn

Chapter 12: ANOVA (Analysis of Variance): Instructor Resources

Teach this lesson

Instructor Resources

Classroom-ready objectives, teaching ideas, questions, and assessment materials for this chapter.

Calculator Instructor Resources

Learning Objectives

  • Explain the purpose of the F distribution.
  • Compare two population variances with an F test.
  • State hypotheses for a one-way ANOVA.
  • Distinguish between-group and within-group variation.
  • Complete and interpret an ANOVA table.
  • Use the F statistic and p-value to make a decision about population means.

Prerequisite Knowledge

  • One- and two-sample hypothesis testing.
  • Variance and standard deviation.
  • Null and alternative hypotheses, significance levels, and p-values.

Teaching Outline

  • Introduce the purpose and vocabulary of ANOVA (Analysis of Variance).
  • Connect the chapter procedure to prior concepts.
  • Work one numerical example in clearly labeled steps.
  • Demonstrate the anova calculator and compare its output with the manual work.
  • Emphasize interpretation, assumptions, and limitations.
  • Conclude with guided practice and a contextual decision.

Key Concepts

  • Explain the purpose of the F distribution.
  • Compare two population variances with an F test.
  • State hypotheses for a one-way ANOVA.
  • Distinguish between-group and within-group variation.
  • Complete and interpret an ANOVA table.

Classroom Demonstration

  • Use a small, transparent data set to demonstrate the chapter procedure.
  • Repeat the example with the anova calculator and reconcile every reported value.
  • Change one input and ask students to predict how the result or conclusion will change.

Questions to Ask

  • Why is the F statistic never negative?
  • What does a large F statistic suggest?
  • What assumptions support a one-way ANOVA?
  • What follow-up work may be needed after rejecting the null hypothesis?

Teaching Notes

  • Require students to state the question and define symbols before substituting numbers.
  • Separate arithmetic accuracy from interpretation when providing feedback.
  • Ask students to check assumptions before selecting a method.
  • Use the companion spreadsheet or calculator as verification rather than as a substitute for reasoning.

Assessment Ideas

  • Assign one procedural computation and one interpretation question.
  • Use a short scenario in which students must select the appropriate method.
  • Ask students to diagnose an intentionally incorrect conclusion.
  • Have students submit calculator output together with a written explanation.

Grading Rubric

CriterionPoints
Selects the appropriate method2
Defines variables, hypotheses, or parameters correctly2
Completes the computation accurately3
Checks assumptions and decision criteria1
Interprets the result in context2
Total10

Exam and Discussion Questions

Basic

  • Define two important terms from ANOVA (Analysis of Variance).
  • State the principal conditions or assumptions for the procedure.

Applied

  • State the null and alternative hypotheses for comparing three means.
  • Explain why ANOVA does not by itself identify which means differ.

Conceptual

  • Why is the F statistic never negative?
  • What follow-up work may be needed after rejecting the null hypothesis?

Keep Exploring

Continue Learning

Explore step-by-step lessons, interactive calculators, downloadable study sheets, and practical educational resources.