
One-Way ANOVA

By now, you are pros with one-sample hypothesis testing and two-sample hypothesis testing!
Surely, we can compare three or more means! One-way analysis of variance (ANOVA) allows us to determine if there is statistical significance in the difference in means among several groups or samples.
Assumptions for One-way ANOVA
- Each sample is drawn from its respective populations that are assumed to be normal.
- The samples are randomly selected.
- The samples are independent from one another.
- The population variances (and standard deviations) are equal.
- The factor is a categorical variable, but the data they contain (response) must be quantitative.
Example #1:
- Factor: Method of learning (classroom, online, self-study)
- Response: Exam grade
Example #2:
- Factor: Type of fertilizer (synthetic, organic, blend)
- Response: Crop yield
Comparing Several Group Means
Let k= number of groups being compared (a.k.a. different samples or different populations).
Ho: μ1=μ2=μ3=...=μk (all population means are equal)
Example
k=3 groups

Ha: at least one μi is different than the others
Example

You can also say...
Ha: at least two means are not equal such that μi=μj
In the example above, μ2 is statistically significantly different than the other means (μ1 and μ3). Alternatively, you can say that μ1=μ2 and μ2=μ3.
Portions of information contained in this publication/book are printed with permission of Minitab, LLC. All such material remains the exclusive property and copyright of Minitab, LLC. All rights reserved.

One-Way ANOVA Table
We can use the one-way ANOVA table to compare multiple population means and determine whether they are all the equal or if they differ.
ANOVA tests result in the following output table:

- k= number of groups (or different samples or populations)
- n= overall sample size (i.e. the sum of all the observations in all the groups)
Example:
- Group 1 has n1=10 observations
- Group 2 has n2=20 observations
- Group 3 has n3=20 observations
- Thus, the overall sample size n=n1+n2+n3=10+20+20=50
SSB (also called SSC or SSR)
- The sum of squares between groups is the variation in results that exists between groups.
- Logically, we would expect any variation between the groups to be due to the different treatment they received because of the assumption that all else being equal, these different samples all come from populations with the same variance.
SSB=n1 ⋅ (xˉ1 − xˉoverall)2 +n2 ⋅ (xˉ2 − xˉoverall)2 +... +nk ⋅ (xˉk − xˉoverall)2
- dfB=k−1 where k is the number of different samples or populations.
- dfB is customarily called dfnumerator
SSW (also called SSE)
- The sum of squares within groups is the variation in results that exists within the groups themselves.
- This variation is the result of randomness since within groups individuals all received the same treatment and were selected from the same population.
SSW=(n1−1)s12 + (n2−1)s22 +... + (nk−1)sk2
- dfW = n−k where n is the overall sample size and k is the number of groups
- dfW is customarily called dfdenominator
SST
- The total sum of squares combining the SSB and SSW.
- It encompasses all existing variation in the one-way ANOVA test.
SST = SSB+SSW =Σallobservations(x−xˉoverall)2
- dfT=n−1 where n is the overall sample size.
MSB (also called MSC or MSR)
- This is the mean of squares between groups.
MSB=dfBSSB
MSW (also called MSE)
- This is the mean of squares within groups.
MSW=dfWSSW
F stat
- One-Way ANOVA F statistic is the ratio between the MSB and MSW:
F=MSWMSB
- The F-test compares the variation between the groups (MSB) to the variation within the group (MSW):
- If the treatments have no impact on the observations, we would expect the variation between and within groups to be the same (resulting in F being approximately equal to 1).
- If there is a difference in between and within group variation, it must be as a result of the different treatments which would result in a higher F-score, leading us to conclude that the population means differ.

Example: One-way ANOVA Table
Suppose you have a sample of 11 athletes that were randomly split into 3 groups, where members of each group follow different nutrition programs (categorical factors). At the end of the program we can measure how much weight in pounds each athlete has gained (quantitative response).
- This is a one-way ANOVA type of question because we are comparing the average weight gain across the three samples (after the athletes were assigned into 3 groups).
- The variance of the populations can be reasonably expected to be the same since all athletes originate from the same original sample.
Results:

Overall n=11, xˉ=3.55 and s=1.695
Complete the One-way ANOVA table:

Refer to this helpful table:

Solve for the SSB (also called SSC or SSR), the sum of squares between groups:
- SSB measures the variation in results that exists between groups.
- Any variation between the groups to be due to the different treatment they received.
SSB=n1 ⋅ (xˉ1 − xˉoverall)2 +n2 ⋅ (xˉ2 − xˉoverall)2 +... +nk ⋅ (xˉk − xˉoverall)2
- dfB=k−1 where k is the number of different samples or populations.
SSB=3 ⋅ (3.33 − 3.55)2 +4 ⋅ (4.75 − 3.55)2 +4 ⋅ (2.5 − 3.55)2=10.32
dfB=3−1=2
Solve for the SSW (also called SSE), the sum of squares within groups:
- SSW measures the variation in results that exists within the groups themselves.
- This variation is the result of randomness since within groups individuals all received the same treatment and were selected from the same population.
SSW=(n1−1)s12 + (n2−1)s22 +... + (nk−1)sk2
- dfW = n−k where n is the overall sample size and k is the number of different samples or populations.
SSW=(3−1)2.0822 + (4−1)1.2582 + (4−1)1.2912=18.42
dfW=11−3=8
Solve for the SST, the total sum of squares combining the SSB and SSW:
SST = SSB+SSW
- dfT=n−1 where n is the overall sample size.
SST = SSB+SSW =10.32+18.42=28.74
dfT=11−1=10
Solve for the MSB (also called MSC or MSR), the mean of squares between groups:
MSB=dfBSSB
MSB=dfBSSB=210.32=5.16
Solve for the MSW (also called MSE), the mean of squares within groups:
MSW=dfWSSW
MSW=dfWSSW=818.42=2.3025
Solve for the F-stat:
F=MSWMSB
F=2.30255.16=2.24
