Skip to content

Group Comparison

t-tests, ANOVA, and non-parametric comparisons with assumption checks and post-hoc correction

You have two or more groups and you want to know whether the differences between them are real. Gradiance picks the right test for your design, checks the assumptions behind it, and reports the effect size next to the p-value - not just the p-value.

What it measures

Whether the central tendency of two or more groups differs by more than chance, and by how much. The agent inspects your data and chooses among:

  • Two groups. Student's or Welch's t-test (unequal variances), or the Mann-Whitney U when normality fails. Paired designs get a paired t-test or Wilcoxon signed-rank.
  • Three or more groups. One-way ANOVA, or Kruskal-Wallis when the data aren't normal. Repeated-measures designs use the matched-samples variant.

Data you upload

  • A column identifying the group (condition, treatment, genotype) and a column of measured values. Long format is easiest, but a wide table with one column per group works too.
  • For paired or repeated-measures designs, a subject/replicate identifier so the agent can match observations across conditions.

What you get back

  • The test that was run, and why it was chosen over the alternatives.
  • The test statistic, degrees of freedom, and p-value.
  • An effect size - Cohen's d, Hedges' g, η², or rank-biserial r - so you can judge magnitude, not just significance.
  • A grouped plot with significance brackets, and the post-hoc pairwise comparisons when there are more than two groups.

Method note

Assumptions are tested before the comparison, not assumed. Normality is checked with Shapiro-Wilk, homogeneity of variance with Levene's test; the agent falls back to Welch or a non-parametric test when they fail. For ANOVA with a significant omnibus result, pairwise post-hocs are corrected for multiple comparisons (Tukey HSD by default, Holm or Bonferroni on request) so a panel of comparisons doesn't inflate your false-positive rate.

Related

For trends across a continuous predictor rather than discrete groups, see Correlation & Regression. For agreement between two measurement methods, see Bland-Altman. The exact formulas and corrections are listed in Statistical Methods.