← All posts

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

Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or StatisticsSystematic Reviews & Meta-AnalysesMethodology and Research Design
On this page

Statistical Test Decision Helper

🧪 Statistical Test Decision Helper

Question 1: Number of Groups

Question 2: Group Structure

Question 3: Type of Outcome (Y)

Question 4: Normality Check

(Only for Continuous, Count, or Proportion outcomes; disabled otherwise.)
Tips: For adjusted analyses consider regression models. Always check assumptions.


Step 1 Identify the Dependent Variable Y

Y (Outcome) ExampleData TypeTypical Scale / Notes
Blood-loss volume (mL), Hb level (g/dL)ContinuousNumeric, theoretically infinite decimals
Gender (male / female)Binary2 ordered or unordered categories
Mortality (yes / no)Binary
Pain score (1–10)OrdinalRanked but distances unequal
Satisfaction (low / med / high)Ordinal
Survival time (days)Time-to-EventEvent plus censoring
Blood group (A / B / AB / O)Categorical > 2 (Nominal)Unordered, >2
Seizure count per monthCountNon-negative integers, often skewed
Proportion of wound infections (%)Proportion / RateBounded 0–1; often with different denominators


Step 2 Define the Independent Groups X

  1. How many groups? (2 vs > 2)
  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


Step 4 Master Test-Selection Table

Dependent Y Type# GroupsStructureIf Normal / Large SampleIf Not Normal / Small n / Ordinal
Continuous2IndependentStudent's t-testMann-Whitney U / Wilcoxon rank-sum
 >2IndependentOne-way ANOVAKruskal-Wallis
 2PairedPaired t-testWilcoxon signed-rank
 >2RepeatedRepeated-measures ANOVAFriedman test
Binary2 or >2Independentχ2 test of independenceFisher's exact test (if any expected cell < 5)
 2PairedMcNemar's testExact McNemar test (mid-p)
 >2 time pointsRepeatedGEE for binary / Logistic mixed model / Multivariable Logistic RegressionCochran's Q test (if available)
Categorical (>2, Nominal)2 or >2Independentχ2 test (RxC format)Fisher's exact (if sparse)
 2PairedStuart-Maxwell or Bowker testExact symmetry test
 >2RepeatedMultinomial logistic / GEERepeated measures log-linear model
Ordinal2IndependentMann-Whitney U / Wilcoxon rank-sum
 >2IndependentKruskal-Wallis
 2PairedWilcoxon signed-rank
 >2RepeatedFriedman test
Count2 or >2IndependentPoisson regression / NB modelNegative binomial (if overdispersion)
 RepeatedGEE or mixed model 
Proportion / Rate2Independentz-test for two proportionsFisher exact
 >2Independentχ2 test or z-test for k proportionsFisher exact (if sparse)
 RepeatedPoisson GEE / Rate ratio modeling 
Time-to-Event2 or >2IndependentLog-rank test / Cox proportional hazardsBreslow / Tarone-Ware / Fleming-Harrington (if PH violated)
 Repeated EventsShared frailty / PWP / AG modelsFlexible 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 differenceSame 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

  1. 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)
  2. 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
  3. Seizure counts pre- vs post-drug in same patients
    • Y: Count, paired
    • Small n, skewed
    • → Wilcoxon signed-rank or Poisson GLMM if covariates needed
  4. 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

  1. Start with Y: Identify its scale.
  2. Count & classify X groups: 2 vs > 2, independent vs paired.
  3. If Y is continuous: Check normality.
  4. Plug into the table to pick the test.
  5. Need adjustment or continuous X? → Move to regression.
0
Message for International and Thai ReadersUnderstanding My Medical Context in ThailandRead more →Message for International and Thai ReadersUnderstanding My Broader Content Beyond MedicineRead more →

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment