ANOVA calculator

Tukey HSD post-hoc test calculator

Perform pairwise mean comparisons following significant ANOVA with Tukey’s Honestly Significant Difference (HSD) test, studentized range q-statistic, adjusted p-values, and confidence intervals.

Run this test live in StatLab npm i @statlab/core

When to use it

Use after a significant omnibus ANOVA F-test to test all pairwise group differences while controlling familywise error rate.

Required Inputs

  • Group means & sample sizes
  • ANOVA MS_error & df_error
  • Alpha significance level

Mathematical Formula

q = (X̄_i - X̄_j) / √(MS_error / n), HSD = q_critical * √(MS_error / n)

Reporting Cautions

  • Assumes equal group sample sizes and equal variances; use Kramer modification for unequal n.
  • Do not run without a prior omnibus ANOVA.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
from statsmodels.stats.multicomp import pairwise_tukeyhsd
res = pairwise_tukeyhsd(endog=data['val'], groups=data['group'], alpha=0.05)
print(res)
R Language
TukeyHSD(aov(val ~ group, data = df))
TypeScript (@statlab/core)
import { tukeyHSD } from '@statlab/core';
const comparisons = tukeyHSD(anovaResult);

Developer Use Cases & Production Integrations

  • Identifying specific winning variants in multi-arm A/B tests after omnibus ANOVA significance.
  • Pinpointing exact performance regressions across multiple benchmark software builds in VoxelAssurance.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.