Statistics and research
One-way ANOVA calculator with Tukey HSD
Compare the means of two or more groups: ANOVA table, η² and ω², Welch’s ANOVA, and Tukey–Kramer pairwise intervals with adjusted p-values.
Runs in your browser. What you enter stays on this page and is not uploaded.
Results
- Effect size η² (= R²)
- 0.264148
- Effect size ω²
- 0.204079
- Pooled SD √MSW
- 0.62337463
- Welch’s ANOVA (unequal variances)
- F = 5.18097 on 2 and 17.1284 df, p 0.01739
- Conclusion
- The group means differ (significant at the 5% level).
| Source | df | Sum of squares | Mean square | F | p-value |
|---|---|---|---|---|---|
| Between groups | 2 | 3.76634 | 1.88317 | 4.846087862 | 0.01591 |
| Within groups | 27 | 10.49209 | 0.388595925926 | ||
| Total | 29 | 14.25843 |
| Group | n | Mean | SD |
|---|---|---|---|
| ctrl | 10 | 5.032 | 0.583091 |
| trt1 | 10 | 4.661 | 0.793676 |
| trt2 | 10 | 5.526 | 0.442573 |
| Comparison | Difference | Lower | Upper | q | Adjusted p |
|---|---|---|---|---|---|
| trt1 − ctrl | -0.371 | -1.0622161 | 0.32021605 | 1.882 | 0.3909 |
| trt2 − ctrl | 0.494 | -0.19721605 | 1.1852161 | 2.506 | 0.198 |
| trt2 − trt1 | 0.865 | 0.17378395 | 1.5562161 | 4.388 | 0.01201 |
Tukey–Kramer intervals handle unequal group sizes. Adjusted p-values use the studentized range distribution (Copenhaver and Holland algorithm, accurate to about 1e-7 for 10 or more error df).
Method and limits
How to use it
Put each group on its own line, optionally starting with a name and a colon (“control: 4.2 5.1 …”). The tool gives the ANOVA table, effect sizes, Welch’s ANOVA for unequal variances and Tukey’s pairwise comparisons.
Formulas
- SSbetween = Σ ni(x̄i − x̄)², SSwithin = ΣΣ(x − x̄i)²; F = (SSbetween/(k − 1)) / (SSwithin/(N − k)); p is the right tail of F(k − 1, N − k).
- η² = SSbetween/SStotal; ω² = (SSbetween − (k − 1) MSwithin) / (SStotal + MSwithin).
- Welch’s ANOVA weights each mean by ni/si² (Welch 1951), as R’s oneway.test.
- Tukey–Kramer: difference ± qα; k, N−k √(MSwithin/2 × (1/ni + 1/nj)); adjusted p from the studentized range distribution (Copenhaver and Holland 1988, as R’s ptukey).
Assumptions and limits
- Independent observations, roughly normal residuals within groups, and similar variances. If the largest SD is more than about twice the smallest, rely on Welch’s ANOVA; for clearly non-normal data use the Kruskal–Wallis test.
- Tukey intervals control the family-wise error over all pairs; they are not needed (or appropriate) for planned single contrasts.
- Studentized range probabilities are accurate to about 1e-7 with 10 or more error degrees of freedom and 1e-5 with 3.
Worked example
R’s PlantGrowth data (dried plant weight, control and two treatments, 10 plants each): F = 4.846 on 2 and 27 df, p = 0.0159, η² = 0.264. Tukey: trt2 − trt1 = 0.865, 95% CI 0.174 to 1.556, adjusted p = 0.0120 — the same as R’s TukeyHSD. The calculator also reproduces the NIST StRD certified ANOVA results for SiRstv and AtmWtAg.
References
- NIST/SEMATECH e-Handbook of Statistical Methods: one-factor ANOVA
- NIST/SEMATECH e-Handbook of Statistical Methods: Tukey’s method
- R documentation: TukeyHSD
- R documentation: oneway.test
- Kramer (1956), Extension of multiple range tests to group means with unequal numbers of replications, Biometrics 12(3)
- Copenhaver and Holland (1988), Computation of the distribution of the maximum studentized range statistic, J. Statist. Comput. Simul. 30
- Welch (1951), On the comparison of several mean values, Biometrika 38
- NIST Statistical Reference Datasets (StRD)
Related tools
- Kruskal–Wallis test calculatorRank-based one-way analysis for three or more groups: H with tie correction, ε² effect size and Dunn’s pairwise tests with Holm adjustment.
- T-test calculatorOne-sample, independent two-sample (Welch and pooled) and paired t-tests from raw data or summary statistics, with confidence intervals and Cohen’s d.
- Effect size calculatorCohen’s d, Hedges’ g and Glass’s Δ from group means, or odds ratio, risk ratio and risk difference from a 2×2 table, each with confidence intervals.
- Standard deviation calculatorPaste data to get the standard deviation (sample and population), variance, mean, median, mode, quartiles with the method stated, IQR, outliers, skewness and kurtosis.
- P-value calculatorFind the p-value and critical values for a z, t, chi-square or F test statistic, one- or two-tailed, accurate far into the tails.