Choosing the right statistical test
courtesy of Prof. Kristin Sainani, Stanford University
Start by asking three questions:
1. What type of data is your outcome variable?
2. Are the observations independent or correlated?
3. Are all required assumptions met?
Are the observations independent or correlated? Alternatives
Outcome Variable Setting Assumptions
Independent Correlated (Use when assumptions are violated)
t-test --- 2 groups normality, adequate sample Wilcoxon rank-sum test
--- Paired t-test 2 groups or time points normality, adequate sample Wilcoxon sign-rank test
ANOVA --- 2 or more groups normality, adequate sample Kruskal-Wallis test
(Analysis of variance)
Continuous Repeated-measures 2 or more groups or
(e.g. pain scale, weight, --- normality, adequate sample
etc.) ANOVA time points
Linear correlation Spearman rank correlation
(Pearson's correlation --- 1 continuous predictor normality, adequate sample
coefficient)
coefficient
Mixed models/General
--- Estimating Equation (GEE)
modeling
Linear regression
(multivariate regression ---
technique)
Risk difference
--- 2x2 table non-sparse data
Relative risk
McNemar's chi square
--- 2x2 table non-sparse data McNemar's exact test
test
Chi square test --- RxC table non-sparse data Fisher's exact test
Binary or
Categorical (e.g.
fracture yes/no) Logistic regression
(multivariate regression --- binary outcome adequate sample
technique)
Conditional logistic
--- regression (multivariate binary outcome adequate sample
regression technique)
GEE modeling
--- (multivariate regression
technique)
Rate ratio --- 2 groups risk uniform over time Time-varying effects model
Kaplan-Meier statistics --- 2 or more groups risk uniform over time Time-varying effects model
Time-to-Event (e.g.
time to fracture)
Cox regression
(multivariate regression --- risk uniform over time Time-varying effects model
technique)
Frailty model
--- (multivariate regression risk uniform over time Time-varying effects model
technique)