What Is ANOVA (Analysis of Variance) and How Do You Use It in Quality Control?
If you need to compare three or more group averages to find out whether the differences are real or just random noise, ANOVA is the tool you're looking for. In quality engineering, it helps you answer questions like, "Do these four machines produce parts with the same average diameter?" or "Does batch temperature affect tensile strength?" This article explains what ANOVA is, how it works, and how to run a simple one-way analysis — with a clear, illustrative example.
What It Is
Analysis of Variance (ANOVA) is a statistical method used to test whether the means of three or more independent groups are equal. Developed by Ronald Fisher in the 1920s, ANOVA compares the variance between groups to the variance within groups. If the between-group variance is significantly larger than the within-group variance, you conclude that at least one group mean differs from the others.
ANOVA is the natural extension of the two-sample t-test when you have more than two groups. It is widely used in manufacturing, process improvement, and design of experiments (DOE). The underlying assumptions are:
How It Works: Formula and Steps
ANOVA partitions the total variability in your data into two components:
The total sum of squares (SST) is simply:
\[
SST = SSB + SSW
\]
For a one-way ANOVA with \(k\) groups and \(n_i\) observations in group \(i\), the steps are:
- Null hypothesis \(H_0\): All group means are equal (\(\mu_1 = \mu_2 = \dots = \mu_k\)).
- Alternative hypothesis \(H_a\): At least one group mean is different.
\[
SSB = \sum_{i=1}^{k} n_i (\bar{X}_i - \bar{X})^2
\]
\[
SSW = \sum_{i=1}^{k} \sum_{j=1}^{n_i} (X_{ij} - \bar{X}_i)^2
\]
- Between groups: \(df_B = k - 1\)
- Within groups: \(df_W = N - k\) (where \(N\) is total sample size)
\[
MSB = \frac{SSB}{df_B}, \quad MSW = \frac{SSW}{df_W}
\]
\[
F = \frac{MSB}{MSW}
\]
A Worked Illustrative Example
Example data (illustrative only). A quality engineer wants to test whether three different suppliers provide bolts with the same average breaking strength (in kN). Five bolts are tested from each supplier.
Supplier A | Supplier B | Supplier C
Step 1 — Group means:
\(\bar{X}_A = 12.18\), \(\bar{X}_B = 11.90\), \(\bar{X}_C = 13.22\)
Overall mean \(\bar{X} = 12.43\)
Step 2 — SSB:
\[
SSB = 5(12.18-12.43)^2 + 5(11.90-12.43)^2 + 5(13.22-12.43)^2 = 5(0.0625) + 5(0.2809) + 5(0.6241) = 4.8375
\]
Step 3 — SSW:
Sum of squared deviations within each group:
Supplier A: \((12.1-12.18)^2 + \dots + (12.3-12.18)^2 = 0.148\)
Supplier B: \(0.100\)
Supplier C: \(0.148\)
\[
SSW = 0.148 + 0.100 + 0.148 = 0.396
\]
Step 4 — Degrees of freedom:
\(df_B = 3-1 = 2\), \(df_W = 15-3 = 12\)
Step 5 — Mean squares:
\[
MSB = 4.8375 / 2 = 2.41875, \quad MSW = 0.396 / 12 = 0.033
\]
Step 6 — F-statistic:
\[
F = 2.41875 / 0.033 = 73.3
\]
Step 7 — Conclusion: With \(df_B = 2\) and \(df_W = 12\), the critical F-value at \(\alpha = 0.05\) is approximately 3.89 (standard published value). Since \(F = 73.3 > 3.89\), you reject the null hypothesis. The data strongly suggest that at least one supplier's bolts have a different average breaking strength.
Common Pitfalls
Try It Yourself
Running ANOVA by hand is fine for learning, but in real quality work you'll want a quick, reliable calculator. Use the free ANOVA tool at 6SQ ANOVA Calculator — enter your group data, and it will compute the F-statistic, p-value, and help you decide whether your process differences are real.
What It Is
Analysis of Variance (ANOVA) is a statistical method used to test whether the means of three or more independent groups are equal. Developed by Ronald Fisher in the 1920s, ANOVA compares the variance between groups to the variance within groups. If the between-group variance is significantly larger than the within-group variance, you conclude that at least one group mean differs from the others.
ANOVA is the natural extension of the two-sample t-test when you have more than two groups. It is widely used in manufacturing, process improvement, and design of experiments (DOE). The underlying assumptions are:
- Observations are independent.
- Each group is normally distributed (or approximately so).
- Groups have equal variances (homoscedasticity).
How It Works: Formula and Steps
ANOVA partitions the total variability in your data into two components:
- Sum of Squares Between (SSB) — variation due to differences among group means.
- Sum of Squares Within (SSW) — variation due to random error inside each group.
The total sum of squares (SST) is simply:
\[
SST = SSB + SSW
\]
For a one-way ANOVA with \(k\) groups and \(n_i\) observations in group \(i\), the steps are:
- State the hypotheses
- Null hypothesis \(H_0\): All group means are equal (\(\mu_1 = \mu_2 = \dots = \mu_k\)).
- Alternative hypothesis \(H_a\): At least one group mean is different.
- Compute the group means and the overall mean (\(\bar{X}\)).
- Calculate SSB:
\[
SSB = \sum_{i=1}^{k} n_i (\bar{X}_i - \bar{X})^2
\]
- Calculate SSW:
\[
SSW = \sum_{i=1}^{k} \sum_{j=1}^{n_i} (X_{ij} - \bar{X}_i)^2
\]
- Determine degrees of freedom:
- Between groups: \(df_B = k - 1\)
- Within groups: \(df_W = N - k\) (where \(N\) is total sample size)
- Compute mean squares:
\[
MSB = \frac{SSB}{df_B}, \quad MSW = \frac{SSW}{df_W}
\]
- Calculate the F-statistic:
\[
F = \frac{MSB}{MSW}
\]
- Compare F to the critical value from the F-distribution table (at your chosen significance level, commonly \(\alpha = 0.05\)) or use the p-value. If \(p < \alpha\), reject \(H_0\).
A Worked Illustrative Example
Example data (illustrative only). A quality engineer wants to test whether three different suppliers provide bolts with the same average breaking strength (in kN). Five bolts are tested from each supplier.
Supplier A | Supplier B | Supplier C
- 12.1 | 11.8 | 13.2
- 12.4 | 12.0 | 13.0
- 11.9 | 11.7 | 13.5
- 12.2 | 11.9 | 13.1
- 12.3 | 12.1 | 13.3
Step 1 — Group means:
\(\bar{X}_A = 12.18\), \(\bar{X}_B = 11.90\), \(\bar{X}_C = 13.22\)
Overall mean \(\bar{X} = 12.43\)
Step 2 — SSB:
\[
SSB = 5(12.18-12.43)^2 + 5(11.90-12.43)^2 + 5(13.22-12.43)^2 = 5(0.0625) + 5(0.2809) + 5(0.6241) = 4.8375
\]
Step 3 — SSW:
Sum of squared deviations within each group:
Supplier A: \((12.1-12.18)^2 + \dots + (12.3-12.18)^2 = 0.148\)
Supplier B: \(0.100\)
Supplier C: \(0.148\)
\[
SSW = 0.148 + 0.100 + 0.148 = 0.396
\]
Step 4 — Degrees of freedom:
\(df_B = 3-1 = 2\), \(df_W = 15-3 = 12\)
Step 5 — Mean squares:
\[
MSB = 4.8375 / 2 = 2.41875, \quad MSW = 0.396 / 12 = 0.033
\]
Step 6 — F-statistic:
\[
F = 2.41875 / 0.033 = 73.3
\]
Step 7 — Conclusion: With \(df_B = 2\) and \(df_W = 12\), the critical F-value at \(\alpha = 0.05\) is approximately 3.89 (standard published value). Since \(F = 73.3 > 3.89\), you reject the null hypothesis. The data strongly suggest that at least one supplier's bolts have a different average breaking strength.
Common Pitfalls
- Ignoring assumptions. ANOVA is sensitive to unequal variances. If Levene's test fails, consider Welch's ANOVA or a non-parametric alternative like the Kruskal–Wallis test.
- Post-hoc testing. Rejecting \(H_0\) only tells you that not all means are equal — it does not tell you which groups differ. Use Tukey's HSD or Bonferroni correction for pairwise comparisons.
- Small sample sizes. With very small groups, the normality assumption becomes harder to verify, and the test loses power.
- Confusing statistical and practical significance. A large sample can make a trivial difference statistically significant. Always check the actual effect size.
Try It Yourself
Running ANOVA by hand is fine for learning, but in real quality work you'll want a quick, reliable calculator. Use the free ANOVA tool at 6SQ ANOVA Calculator — enter your group data, and it will compute the F-statistic, p-value, and help you decide whether your process differences are real.
No related results found
Invited:
6SQ Tools
0 replies