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: Aug 18
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 postopbleedingp > 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 Type | # Groups | Structure | If Normal / Large Sample | If Not Normal / Small n / Ordinal |
Continuous | 2 | Independent | Student's 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 | χ2 test of independence | Fisher's exact test (if any expected cell < 5) |
2 | Paired | McNemar's test | Exact McNemar test (mid-p) | |
>2 time points | Repeated | GEE for binary / Logistic mixed model / Multivariable Logistic Regression | Cochran's Q test (if available) | |
Categorical (>2, Nominal) | 2 or >2 | Independent | χ2 test (RxC format) | Fisher's exact (if sparse) |
2 | Paired | Stuart-Maxwell or Bowker test | Exact symmetry test | |
>2 | Repeated | Multinomial logistic / GEE | Repeated measures log-linear model | |
Ordinal | 2 | Independent | — | Mann-Whitney U / Wilcoxon rank-sum |
>2 | Independent | — | Kruskal-Wallis | |
2 | Paired | — | Wilcoxon signed-rank | |
>2 | Repeated | — | Friedman test | |
Count | 2 or >2 | Independent | Poisson regression / NB model | Negative binomial (if overdispersion) |
Repeated | GEE or mixed model | — | ||
Proportion / Rate | 2 | Independent | z-test for two proportions | Fisher exact |
>2 | Independent | χ2 test or z-test for k proportions | Fisher exact (if sparse) | |
Repeated | Poisson GEE / Rate ratio modeling | — | ||
Time-to-Event | 2 or >2 | Independent | Log-rank test / Cox proportional hazards | Breslow / Tarone-Ware / Fleming-Harrington (if PH violated) |
Repeated Events | Shared frailty / PWP / AG models | Flexible parametric or RMST-based models |
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