How to Choose Statistical Test in Clinical Research: T-test, Mann-Whitney U / Ranksum, ANOVA, Kruskal-Wallis, Paired t-test, Wilcoxon Signed-Rank, Chi-square, Fisher’s Exact, Log-rank, Cox regression
- Mayta
- Jun 11
- 3 min read
Updated: Jun 11
Step 1 Identify the Dependent Variable Y
Y (Outcome) Example | Data Type | Typical Scale / Notes |
Blood-loss volume (mL), Hb level (g/dL) | Continuous | Numeric, theoretically infinite decimals |
Gender (male / female) | Binary | 2 ordered or unordered categories |
Mortality (yes / no) | Binary | — |
Pain score (1–10) | Ordinal | Ranked but distances unequal |
Satisfaction (low / med / high) | Ordinal | — |
Survival time (days) | Time-to-Event | Event plus censoring |
Blood group (A / B / AB / O) | Categorical > 2 (Nominal) | Unordered, >2 |
Seizure count per month | Count | Non-negative integers, often skewed |
Proportion of wound infections (%) | Proportion / Rate | Bounded 0–1; often with different denominators |
Step 2 Define the Independent Groups X
How many groups? (2 vs > 2)
Structure:
Independent groups (different patients / subjects)
Paired / repeated (same subject measured twice or more)
(If X itself is continuous—e.g., dosage in mg—see “When to use regression” below.)
Step 3 If Y Is Continuous → Check Normality
stata: hist postopbleeding, normal swilk postopbleeding
p > 0.05 → “looks normal” → parametric tests
p < 0.05 → not normal → non-parametric tests (or transform / use GLM)
Step 4 Master Test-Selection Table
Dependent Y | # Groups | Structure | If Normal / Large-Sample | If Not Normal / Small n / Ordinal |
Continuous | 2 | Independent | Student t-test | Mann-Whitney U / Wilcoxon rank-sum |
> 2 | Independent | One-way ANOVA | Kruskal-Wallis | |
2 | Paired | Paired t-test | Wilcoxon signed-rank | |
> 2 | Repeated | Repeated-measures ANOVA | Friedman test | |
Binary | 2 or > 2 | Independent | χ² test of independence | Fisher exact (if any cell < 5) |
Categorical > 2 (Nominal) | 2 or > 2 | Independent | χ² test (RxC) | Fisher exact (if sparse) |
Ordinal | 2 | Independent | — | Mann-Whitney / Wilcoxon rank-sum |
> 2 | Independent | — | Kruskal-Wallis | |
Count | 2 or > 2 | Independent | — | Poisson test or negative-binomial |
Proportion / Rate | 2 | Independent | z-test for two proportions | Fisher exact |
Time-to-Event | 2 or > 2 | Independent | — | Log-rank test / Cox proportional-hazards |
Step 5 When to Use Regression Instead of a Simple Test
If you need … | Regression of choice |
Adjust for ≥1 covariate (age, sex, baseline Hb, …) | Linear (continuous Y), logistic (binary Y), multinomial logistic (nominal Y > 2), ordinal logistic, Poisson/negative-binomial (counts), Cox (time-to-event) |
Predict risk / odds / mean rather than test difference | Same as above |
Model continuous X (e.g., dose in mg) | Include X as continuous term or use spline |
Handle interaction terms (e.g., Tx × sex) | Any generalized linear model (GLM) |
Step 6 Example Walk-Throughs
Post-op bleeding (mL) across 3 TXA dose groups
Y: Continuous
2 independent groups
Normality p < 0.05 → Not normal
→ Kruskal-Wallis
stata: kwallis postopbleeding, by(txagroup)
Infection type (A/B/C) by TXA vs no TXA
Y: Categorical (>2)
2 independent groups
→ χ² test (2×3 table)
stata: tabi 20 5 3 \ 15 12 8 , chi2
Seizure counts pre- vs post-drug in same patients
Y: Count, paired
Small n, skewed
→ Wilcoxon signed-rank or Poisson GLMM if covariates needed
30-day survival across 4 surgical centers
Y: Time-to-event
2 independent groups
→ Log-rank test; follow-up Cox model for adjustment
stata: sts test center stcox i.center age sex
Quick Recap
Start with Y: Identify its scale.
Count & classify X groups: 2 vs > 2, independent vs paired.
If Y is continuous: Check normality.
Plug into the table to pick the test.
Need adjustment or continuous X? → Move to regression.
Comments