🏭 Quality control on three bottling lines
Research question: Do the lines fill to the same average volume, and is any line less consistent? Answer: Because Levene's test showed unequal variances, Welch's ANOVA was used. A one-way Welch ANOVA showed a significant difference in fill volume (ml) between filling lines, F(2, 91.21) = 7.42, p = .001, η² = .05. Line 1: M = 500.26, SD = 1.07; Line 2: M = 499.52, SD = 0.92; Line 3: M = 500.21, SD = 2.25. Pairwise Tukey HSD comparisons (which assume equal variances, so treat them with caution here) showed that Line 1 was higher than Line 2 (p = .045).
Open this example in StatLab Dataset and codebook (CSV, Excel, .sav)
What is the situation?
A fictional beverage plant samples 50 bottles from each of three filling lines; the target fill is 500 ml. The data are synthetic — produced by a seeded random process for teaching; they describe no real people or organisations.
What is in the dataset?
150 cases.
| Variable | Label | Measure | Value labels |
|---|---|---|---|
bottle | Bottle number | scale | |
line | Filling line | nominal | 1 = Line 1, 2 = Line 2, 3 = Line 3 |
fill_ml | Fill volume (ml) | scale |
How is it analysed, step by step?
- Explore — Compare centre and spread of each line and spot outliers. (guide)
Line 1: M = 500.26, SD = 1.07, median = 500.09, Shapiro-Wilk W(50) = .948, p = .029
Line 2: M = 499.52, SD = 0.92, median = 499.52, Shapiro-Wilk W(50) = .971, p = .260
Line 3: M = 500.21, SD = 2.25, median = 500.00, Shapiro-Wilk W(50) = .982, p = .642 - One-way ANOVA — Compare means; Levene's test tells you whether to trust the classic F or Welch's F. (guide)
Levene F(2, 147) = 24.76, p < .001 → variances differ, so read the Welch row. ANOVA F(2, 147) = 3.62, p = .029, η² = .05; Welch F(2, 91.21) = 7.42, p = .001. Tukey HSD: Line 1 vs Line 2: difference 0.74, p = .045; Line 1 vs Line 3: difference 0.05, p = .985; Line 2 vs Line 3: difference −0.69, p = .067.
How would I write it up (APA style)?
Because Levene's test showed unequal variances, Welch's ANOVA was used. A one-way Welch ANOVA showed a significant difference in fill volume (ml) between filling lines, F(2, 91.21) = 7.42, p = .001, η² = .05. Line 1: M = 500.26, SD = 1.07; Line 2: M = 499.52, SD = 0.92; Line 3: M = 500.21, SD = 2.25. Pairwise Tukey HSD comparisons (which assume equal variances, so treat them with caution here) showed that Line 1 was higher than Line 2 (p = .045).
Every number on this page was computed by StatLab's statistics engine from this dataset when the page was built, and the same analyses are part of the reference validation against scipy/statsmodels (433 reference test cases, 36,554 values checked against scipy/statsmodels/numpy, 0 failures). “Open this example” loads the data and runs these steps live in your browser.