UPI Study › Courses › Marketing Research › Free lessons › Lesson 11.3 Free lesson
ANOVA: Comparing Differences Across Three or More Groups
Marketing Research · Chapter 11: Hypothesis Testing and Inferential StatisticsSection 11.3 · lesson 77 of 10111 min · free to watch
Lesson complete
Earn the 3 college credits for Marketing Research
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: The Z Test: Formula and Examples →← Understanding t-Tests: Assessing Statistical Differences Between GroupsNext lesson: The Z Test: Formula and Examples →
In this lesson
Compare three or more group means with one F test.
- Explain why running many t-tests on the same data raises the false-alarm risk
- Read an ANOVA table with sums of squares, degrees of freedom, F and the p-value
- Interpret what a significant F does and does not tell you
- Name post hoc tests used to find which groups differ
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (1,510 words). Read along, or search it.
Opening Question
Three Pack Designs, Eight Stores Each
Fernway Snacks, a composite case built for teaching, has three designs for its snack bar pack: Classic, Green, and Bold. Leo tried each design in eight Larkfield stores, and tracked weekly sales. Green looks best. But with three groups, who is "different" from whom?
Could Leo compare every pair with a separate test? The surprising answer is that doing so quietly rigs the game against him. ANOVA tests all the groups at once.
By the end of this lesson, you will explain why several t-tests on the same data raise the false-alarm risk. You will read an ANOVA, with its F statistic, its degrees of freedom, and its p-value. And you will know what a significant F does, and does not, tell you.
Multiple Tests
False-Alarm Risk Grows With Pairs
First: why not just run many t-tests? With three packs, there are three pairs. Classic against Green. Classic against Bold. And Green against Bold.
Each t-test, at an alpha of 0.05, has a five percent false-alarm chance. That is the Type I error, from lesson 11.1. Run three tests, and the chance that at least one cries wolf grows.
How fast does it grow? Treat the tests as independent, as a rough guide. One test, one pair: 5.0 percent. Three groups, three pairs: 14.3 percent. Four groups, six pairs: 26.5 percent. Five groups, ten pairs: 40.1 percent.
Rigged Game
Forty Percent Risk With Five Groups
So more groups mean more pairs. And more pairs mean more chances for a false alarm. With five groups, the risk is about forty percent, not five. That is the rigged game. Each test looks fair on its own. But together, they give luck many chances to fool you. And the more chances luck gets, the more likely it is that one of them lands. ANOVA asks one overall question first, so it keeps alpha at 0.05.
Core Idea
Between-Group Versus Within-Group Spread
Next, the idea: between-group spread, versus within-group spread. ANOVA compares two kinds of variation.
Stores that carry the same pack still differ from each other. Why? Location. Shoppers. Luck. That is the within-group variation. It is the background noise.
The pack means also differ from the grand mean, the average of all the stores. That is the between-group variation.
Here is the logic. If the pack designs do nothing, the group means differ only because of the noise. So the two kinds of variation should be about equal. But if the designs matter, the between-group spread is much bigger.
Now the data. These are units sold, per store, per week, and the numbers are invented. Classic: 41, 38, 45, 40, 43, 37, 42, 44.
Green: 47, 50, 44, 49, 46, 52, 48, 45. And Bold: 43, 46, 41, 47, 44, 42, 45, 48.
Data and Hypotheses
Overlapping Ranges, Separate Centers
The group means are 41.25 for Classic, 47.62 for Green, and 44.50 for Bold. The grand mean is 44.46.
Picture each store as a dot. The three pack means sit apart. But the stores within each pack are spread out, too. ANOVA measures the first spread, against the second. Look at Classic. Its stores range from 37 to 45. Now look at Green. Its stores range from 44 to 52. The ranges overlap a little. But the centers sit clearly apart. That is exactly the pattern ANOVA is built to detect.
Now, the hypotheses, in words. The null: all three packs have the same true mean weekly sales. The alternative: at least one pack's true mean is different. In symbols, the null says mu one equals mu two equals mu three. The alternative says not all mu are equal. Alpha is 0.05.
Formula
Sums of Squares and Degrees of Freedom
The formula, in words. F is the mean square between groups, divided by the mean square within groups. And a mean square is a sum of squared distances, divided by its degrees of freedom.
Let us unpack the two sums. The sum of squares between groups takes each group's size, times the squared distance of its mean from the grand mean. Then it adds those up. The sum of squares within groups takes each store's squared distance from its own group's mean. And it adds those up, over all the stores.
Then come the degrees of freedom. Between groups, it is the number of groups, minus one. With three packs, that is 2. Within groups, it is the total number of stores, minus the number of groups. With twenty-four stores and three packs, that is 21.
Python's numbers fit the standard ANOVA table. Between packs: a sum of squares of 162.58, with 2 degrees of freedom. So the mean square is 81.29.
F Statistic
Signal Eleven Times the Noise
Within packs: a sum of squares of 147.38, with 21 degrees of freedom. So the mean square is 7.02. The total sum of squares is 309.96, with 23 degrees of freedom.
So the between-pack mean square is about 11.6 times the within-pack one. That ratio is F, at 11.58. If the designs had no effect, F would usually be near one. Why one? Because then both mean squares would measure the same thing: the background noise. Noise over noise is about one. Here, the signal between packs is more than eleven times the noise inside them.
A few facts about F. It can never be negative, because it is built from squares. And its curve is lopsided. For 2 and 21 degrees of freedom, the cutoff for the top five percent is 3.467.
Decision
Far Beyond the 3.467 Cutoff
Our F is far beyond that cutoff. Luck alone would almost never produce it. Why is the curve lopsided? Most of the time, when nothing is going on, F lands near one. Values far above one are rare. And values below zero cannot happen at all. So the curve bunches up on the left, and trails off to the right. The red tail on the right holds the top five percent.
The decision. The p-value is 0.0004. That is below 0.05. And F, at 11.58, is above 3.467. So we reject the null hypothesis.
This means the three packs at Fernway do not all sell the same. Pack design matters, for sales. Think about what that saves. Leo ran one test, not three. His false-alarm risk stayed at five percent. And he still learned that something real is going on, among the packs.
Limits
Which Group Differs Needs a Post Hoc Test
Now, what a significant F does not tell you. ANOVA answers one question only. Are the means all equal? A significant F says no: at least one is different. But it does not say which one.
Green has the highest sample mean. But F alone does not prove that Green beats Bold. To find which pairs differ, while still controlling the false-alarm risk from Part 1, analysts follow up with a post hoc test. Examples are Tukey's test, or a Bonferroni-adjusted comparison. We name them here only. The software runs them.
ANOVA also makes assumptions. Each group should be roughly bell-shaped. The groups should have similar spread. And the stores should be independent of each other. When that fails, lesson 11.5 shows other options.
Common Mistake
Significant F Does Not Mean All Differ
Leo points at the table, back at the office. "Green wins!" Grace shakes her head. "The F test says the packs are not all the same. To say Green beats Bold, I need a follow-up test, one that accounts for comparing several pairs." The planner adds a line: run a post hoc test before choosing a design. Notice the order. First, one overall test, to ask whether anything differs. Then, a careful follow-up, to ask what differs. That order is what keeps the false-alarm risk under control.
Here is a common mistake. People read "significant F" as "every group differs from every other." That is wrong. One odd group can make F significant, while the other two are nearly identical. So look at the group means, and run a post hoc test, before naming winners.
Fun Fact
Named for Ronald Fisher
A fun fact. The F statistic is named in honor of Ronald Fisher. He was a British statistician. He developed ANOVA in the early nineteen hundreds. He worked at first with data from agricultural field trials. Which field of wheat grew best? It is the same question, with packs instead of plots.
Try it yourself. In the practice file, add four to every number in the Bold group. Predict first. Will F rise, or fall? Then run it, and check your guess against the between-group mean square. Here is a hint. Adding four moves Bold's mean up, but it does not change the spread of Bold's own stores. So only one of the two mean squares moves.
Key Takeaways
One Overall Test, Then Follow-Ups
Key takeaways. Running a t-test on every pair piles up the false-alarm risk. One-way ANOVA compares three or more means, with one test. F is the mean square between, over the mean square within. That is between-group variation, over within-group variation. Its degrees of freedom are k minus one, and N minus k. A big F means the groups differ more than stores within a group do. A significant F says the means are not all equal. And a post hoc test is needed to say which ones differ.
Next, in lesson 11.4, you will meet the z test, used when the population's standard deviation is known. This lesson was made by UPI Study.
About Marketing Research at UPI Study
Marketing Research (Marketing 300) is a self-paced online course of 101 video lessons in 13 chapters, from consumer behavior, segmentation and the research process to qualitative methods, surveys and sampling, measurement, experiments, secondary and syndicated data, descriptive statistics, hypothesis tests, correlation and regression, research ethics and reports. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Business courses Every credit course with PRO →
Why take it here
Why students take Marketing Research with UPI Study
Where the credit goes
Universities that work with NCCRS
Marketing Research carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About ANOVA: Comparing Differences Across Three or More Groups
Why use ANOVA instead of multiple t-tests?
How is the F statistic calculated in one-way ANOVA?
What does a significant ANOVA result tell you?
What are the assumptions of one-way ANOVA?
About the Marketing Research course
How many college credits is Marketing Research?
How much does Marketing Research cost and what is included?
Which universities accept UPI Study credits?
How long does Marketing Research take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Marketing Research.
101 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →