Skip to content
All lessons
Cross-cutting · Biostatistics

Choosing a Statistical Test

A boards-focused framework for picking the right statistical test by outcome-variable type (mean vs. proportion), number of groups, and paired vs. independent design — covering the t-test, ANOVA, chi-square, correlation, linear/logistic regression, and their non-parametric counterparts.

10 min readHigh yield

The Three-Question Framework

Choosing a statistical test reduces to three questions the boards love: (1) What type of outcome data? — continuous/numerical (blood pressure, HbA1c) vs. categorical/proportion (cured vs. not cured). (2) How many groups are compared? — two vs. three or more. (3) Independent or paired samples? — different subjects vs. the same subjects measured twice (before/after) or matched.

For continuous outcomes you compare means: 2 groups → t-test; ≥3 groups → ANOVA. For categorical outcomes you compare proportions/frequencieschi-square test. To measure the relationship between two continuous variablescorrelation/regression.

Nail the outcome-variable type first — it is the single most common trap on Step 1: a mean points to t-test/ANOVA, a proportion points to chi-square.

Core Tests at a Glance
  • t-test = compares the means of 2 groups (continuous data). "Mean BP: drug vs. placebo."
  • Paired t-test = 2 measurements in the same subjects (before/after, matched pairs).
  • ANOVA (analysis of variance) = compares means of ≥3 groups. Says a difference exists, not which groups differ → post-hoc test (e.g., Tukey) localizes it.
  • Chi-square (χ²) = compares proportions/frequencies of categorical (nominal) data between groups. "% remission across 3 arms."
  • Fisher exact test = chi-square alternative when any expected cell count is small (<5).
  • Correlation (Pearson r) = strength/direction of a linear relationship between 2 continuous variables; r ranges −1 to +1.
  • Regression predicts an outcome from predictor(s): linear regression → continuous outcome; logistic regression → binary/categorical outcome (yields odds ratios).
  • Buzzwords: "mean/average" → t-test/ANOVA; "percentage/proportion/rate" → chi-square; "before-and-after same patients" → paired t-test.

Test-Selection Grid

Outcome variableGroups / setupTest
Continuous (means)2 independent groupsUnpaired t-test
Continuous (means)2 paired / before–afterPaired t-test
Continuous (means)≥3 groupsANOVA
Categorical (proportions)2+ groupsChi-square (Fisher if expected count <5)
2 continuous variablesassociation / trendCorrelation / regression
Parametric testNon-parametric counterpart
Unpaired t-testMann–Whitney U / Wilcoxon rank-sum
Paired t-testWilcoxon signed-rank
One-way ANOVAKruskal–Wallis
Pearson correlationSpearman rank correlation
Vignette: Two Groups, a Mean

Vignette: A trial randomizes hypertensive patients to drug A vs. placebo and compares the mean systolic blood pressure between the two groups at 12 weeks.

Best test → Unpaired (independent) t-test — the outcome is a mean (continuous) with exactly 2 independent groups.

Twist: If they measured systolic BP in the same patients before and after the drug → paired t-test.

Twist: If the outcome were the proportion of patients reaching BP <140/90 (categorical) → chi-square test, not a t-test.

Key discriminator: the outcome variable's type decides everything — a mean → t-test/ANOVA; a proportion → chi-square.

Vignette: Three Groups, and a Trap

Vignette: Researchers compare mean LDL cholesterol among three diet groups (low-carb, low-fat, Mediterranean) at 6 months.

Best test → One-way ANOVA — comparing means across ≥3 groups. A significant result means the groups differ somewhere; a post-hoc test (e.g., Tukey) identifies which pairs differ.

Common trap: running multiple pairwise t-tests on 3+ groups inflates the type I error (false-positive) rate → use ANOVA instead.

Contrast: if they compared the percentage achieving LDL <100 across the 3 diets → chi-square (proportions, not means).

Lock It In

"T for Two, ANOVA for A-lot"

  • T-test → compares Two means.
  • ANOVAAnalysis Of VAriance → 3+ ("a lot of") means.
  • Chi-square → Categorical data → compares proportions/counts (handy phonetic cue: Chi and Categorical share a hard "C" sound).

"Mean → t/ANOVA, Percent → Chi."

Decide by the outcome variable first, then count the groups, then check paired vs. independent.

Parametric vs. Non-parametric & Pitfalls
  • Parametric tests (t-test, ANOVA, Pearson) assume the outcome is continuous and approximately normally distributed. Violated by skewed data, very small samples, or ordinal data → switch to non-parametric counterparts. (In large samples t-test/ANOVA stay robust via the central limit theorem.)
  • Non-parametric = rank-based: Mann–Whitney U (2 groups), Kruskal–Wallis (≥3 groups), Wilcoxon signed-rank (paired), Spearman (correlation).
  • Classic trap: Wilcoxon rank-sum (= Mann–Whitney U, unpaired) vs. Wilcoxon signed-rank (paired) — different tests.
  • Ordinal data (pain 1–10, cancer stage, Likert scale) → non-parametric tests.
  • Two categorical variables → chi-square, or Fisher exact when any expected cell count <5.
  • Correlation ≠ causation, and r measures linear association only.
  • Most-tested error: choosing a t-test/ANOVA for proportions or chi-square for means — always match the test to the outcome data type first.
Normal (bell-shaped) distribution curve showing the 68–95–99.7 percentages within one, two, and three standard deviations of the mean
Parametric tests (t-test, ANOVA, Pearson) assume an approximately normal outcome distribution; skewed or ordinal data call for non-parametric, rank-based tests. · Wikimedia Commons — M. W. Toews — CC BY 2.5, via Wikimedia Commons

Practice Biostatistics now

Board-style questions, spaced-repetition flashcards, and a Socratic AI tutor — free to start.