Bonferroni correction
Definition taught in Analysis of variance examples, part of Data analysis
Bonferroni correction

| Type | Definition |
| Taught in | Analysis of variance examples |
| Part | Data analysis |
| Worked examples | 1 |
| Questions using it | 1 |
To make m comparisons with a familywise error rate of at most \alpha, run each at level \alpha/m. Equivalently, multiply each p-value by m, capping at 1.
Examples
Five treatments for cold sores
Worked example from Analysis of variance examples
Thirty patients with cold sores were assigned at random to five treatments, six to each; treatment 1 is a placebo. The days until the sore healed were
| Placebo | T2 | T3 | T4 | T5 |
|---|---|---|---|---|
| 5 | 4 | 6 | 7 | 9 |
| 8 | 6 | 4 | 4 | 3 |
| 7 | 6 | 4 | 6 | 5 |
| 7 | 3 | 5 | 6 | 7 |
| 10 | 5 | 4 | 3 | 7 |
| 8 | 6 | 3 | 5 | 6 |
Question. Do the treatments differ in mean healing time?
Solution. The table is not in standard form: for an analysis the healing times must be one column and the treatment a factor in another. stack does that.
x <- data.frame(Placebo = c(5, 8, 7, 7, 10, 8), T2 = c(4, 6, 6, 3, 5, 6),
T3 = c(6, 4, 4, 5, 4, 3), T4 = c(7, 4, 6, 6, 3, 5),
T5 = c(9, 3, 5, 7, 7, 6))
coldsore <- stack(x)
names(coldsore) <- c("times", "treatment")
tapply(coldsore$times, coldsore$treatment, mean)
# Placebo T2 T3 T4 T5
# 7.500 5.000 4.333 5.167 6.167
coldsore.lm <- lm(times ~ treatment, data = coldsore)
anova(coldsore.lm)
# Df Sum Sq Mean Sq F value Pr(>F)
# treatment 4 36.467 9.1167 3.896 0.01359
# Residuals 25 58.500 2.3400Under equal means F=3.90 would come from an F_{4,25} distribution, and the p-value is 0.014, so the treatments do differ. The placebo has the longest mean healing time, 7.5 days. The residual mean square, 2.34, estimates the common variance, so the within-group standard deviation is about 1.5 days.
Used in
- Taught in Analysis of variance examples, where the derivation and examples are.
- Also used in Analysis of variance
- Questions that use it (1) — Five treatments, ten pairs
- All 2 questions on Analysis of variance examples