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.
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/frequencies → chi-square test. To measure the relationship between two continuous variables → correlation/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.
- 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 variable | Groups / setup | Test |
|---|---|---|
| Continuous (means) | 2 independent groups | Unpaired t-test |
| Continuous (means) | 2 paired / before–after | Paired t-test |
| Continuous (means) | ≥3 groups | ANOVA |
| Categorical (proportions) | 2+ groups | Chi-square (Fisher if expected count <5) |
| 2 continuous variables | association / trend | Correlation / regression |
| Parametric test | Non-parametric counterpart | |
| Unpaired t-test | Mann–Whitney U / Wilcoxon rank-sum | |
| Paired t-test | Wilcoxon signed-rank | |
| One-way ANOVA | Kruskal–Wallis | |
| Pearson correlation | Spearman rank correlation |
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: 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).
"T for Two, ANOVA for A-lot"
- T-test → compares Two means.
- ANOVA → Analysis 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 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.
Practice Biostatistics now
Board-style questions, spaced-repetition flashcards, and a Socratic AI tutor — free to start.