How to Choose the Right Statistical Test
Click a test to see a short description and R code. The tree includes classic group comparisons and regression for confounders.
What type of question?
Zoom
100%
-
Comparing groups
-
What type of data?
-
Numerical
-
How many groups?
-
1 group vs known value
-
One-sample t test / Wilcoxon Continuous, one group
-
-
2 groups
-
Independent
-
Independent t test / Mann–Whitney Continuous, 2 independent groups
-
-
Paired
-
Paired t test / Wilcoxon signed rank Continuous, paired
-
-
-
3+ groups
-
ANOVA / Kruskal–Wallis / Repeated measures Continuous, 3+ groups
-
-
-
Categorical
-
How many variables?
-
Two variables
-
Chi square / Fisher’s exact Contingency table
-
-
One vs expected proportion
-
Binomial / Proportion z test Single proportion
-
-
-
-
-
-
Checking prediction
-
Relationship / prediction
-
Correlation
-
Pearson / Spearman correlation Association of two variables
-
-
Regression with confounders
-
Outcome type?
-
Linear regression Continuous outcome
-
Logistic regression Binary event / incidence
-
Beta regression Proportion, 0–1 bounded
-
Cox proportional hazards Time to event
-
Poisson / Negative binomial regression Counts or rates
-
-
-
-
-
