Tukey intervals
Definition taught in Analysis of variance, part of Statistical inference
Tukey intervals

| Type | Definition |
| Taught in | Analysis of variance |
| Part | Statistical inference |
| Worked examples | 3 |
| Questions using it | 1 |
In a one-way design with k groups of equal size r, and n=kr, the probability is 1-\alpha that every one of the \binom k2 differences \mu_i-\mu_j simultaneously satisfies
\overline Y_{\cdot i}-\overline Y_{\cdot j}-D\sqrt{\mathrm{MS}_{\mathrm{error}}}<\mu_i-\mu_j<\overline Y_{\cdot i}-\overline Y_{\cdot j}+D\sqrt{\mathrm{MS}_{\mathrm{error}}}, \qquad D=\frac{Q_{k,\,n-k;\,1-\alpha}}{\sqrt r},
where Q_{k,\,n-k;\,1-\alpha} is the quantile of the studentised range for k groups and n-k error degrees of freedom.
Examples
Five varieties of corn
Worked example from Analysis of variance
Five varieties of corn are each grown on three plots.
| Variety | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Yields | 46.2, 51.9, 48.7 | 49.2, 58.6, 57.4 | 60.3, 58.7, 60.4 | 48.9, 51.4, 44.6 | 52.5, 54.0, 49.3 |
| Mean | 48.93 | 55.07 | 59.80 | 48.30 | 51.93 |
Question. Do the varieties differ in mean yield?
Solution. The grand mean is 52.81. Then \mathrm{SS}_{\mathrm{treatment}}=3\sum_j(\overline y_{\cdot j}-52.81)^2=270.3 on 4 degrees of freedom, and \mathrm{SS}_{\mathrm{error}}=105.7 on 10.
| Source | Df | SS | MS | F | p |
|---|---|---|---|---|---|
| Variety | 4 | 270.3 | 67.57 | 6.39 | 0.008 |
| Error | 10 | 105.7 | 10.57 | ||
| Total | 14 | 375.9 |
The p-value is 0.008, so the varieties differ. The pooled standard deviation is \sqrt{10.57}=3.25. The F test says only that the five means are not all equal; which varieties differ is the next question.
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.
A Tukey interval for two varieties
Question page: A Tukey interval for two varieties
Five corn varieties are grown in r=3 plots each. The variety means include \overline y_3=59.800 and \overline y_4=48.300. The residual mean square on 10 degrees of freedom is 10.57. The studentised-range quantile Q_{5,10;\,0.95} is 4.654.
Compute the Tukey interval for \mu_3-\mu_4 at familywise level 0.05, and say whether the test declares the two means different.
The estimated difference is 59.800-48.300=11.5. The half-width is
4.654\sqrt{\frac{10.57}{3}}=4.654\times1.877\approx 8.74.
The interval is 11.5\pm 8.74, that is (2.76,\,20.24). It excludes zero, so the two variety means are declared different at familywise level 0.05.
Used in
- Taught in Analysis of variance, where the derivation and examples are.
- Also used in Analysis of variance examples
- Questions that use it (1) — A Tukey interval for two varieties
- All 6 questions on Analysis of variance
See also
One-way analysis of variance · ANOVA sum of squares decomposition · ANOVA F distribution · Contrast · Randomised block design