STATISTICAL TEST SELECTION
Which Statistical Test Should I Use?
A practical starting point for common research questions, including comparing groups, studying associations, analyzing repeated measurements, and evaluating time-to-event outcomes.
Published by BioTabularLast reviewed: November 7, 2026
Choosing a statistical test starts with the research question and the structure of the data—not with the software. This guide does not replace study-design expertise, a pre-specified analysis plan, or statistical review for complex studies.
Before choosing a test, identify the outcome you want to analyze, whether observations are independent or matched/repeated, how many groups or variables you are comparing, and whether the design meets the method’s assumptions.
Quick decision tree
What is your primary question?
|
|-- Are you comparing a numeric or ordinal outcome between groups?
| |-- Two groups
| | |-- Matched observations → Paired t-test / Wilcoxon signed-rank test
| | └-- Independent groups → Welch t-test / Wilcoxon rank-sum test
| └-- Three or more independent groups → One-way ANOVA / Kruskal–Wallis test
|
|-- Are you studying the association between two variables?
| |-- Two numeric or ordinal variables → Pearson or Spearman correlation
| └-- Two categorical variables → Chi-square or Fisher's exact test
|
|-- Do you have repeated measurements over time for each participant or sample?
| └-- Random-intercept linear mixed model
|
└-- Is the outcome time until an event, with possible censoring?
└-- Kaplan–Meier curve; log-rank test to compare groupsFive short worked pathways
These examples show how the research question and observation structure lead to a reasonable starting method. They do not replace assumption checks or a study-specific analysis plan.
1. Two independent numeric groups
- Research question
- Does mean day-14 biomarker concentration differ between treatment and control?
- Data structure
- One numeric outcome and one two-level group variable; each participant appears once.
- Design check
- Treatment participants are different people from control participants, so there is no pairing key.
- Starting method
- Welch independent two-sample t-test when a mean difference is the estimand and the group distributions support it.
- Common mistake
- Pairing rows by display order or using a pooled-variance test automatically.
2. Paired before-and-after measurements
- Research question
- What is the mean within-participant change in systolic blood pressure after eight weeks?
- Data structure
- One participant ID and two numeric measurement columns, before and after.
- Design check
- Each follow-up value must be linked to the correct baseline value from the same participant.
- Starting method
- Paired t-test of after-minus-before differences when a mean change is the estimand and the difference distribution is reasonable.
- Common mistake
- Treating the columns as independent samples or checking only their separate distributions.
3. Three independent groups
- Research question
- Does mean enzyme activity—or the distribution of an ordinal symptom score—differ among three independent groups?
- Data structure
- One numeric or ordinal outcome and one three-level group variable; each experimental unit belongs to one group.
- Design check
- Confirm that the same unit was not measured in multiple groups and that there is no unmodeled clustering.
- Starting method
- One-way ANOVA for an overall mean comparison when its assumptions are reasonable; Kruskal–Wallis for a rank-distribution question. Prespecified adjusted follow-ups address where differences occur.
- Common mistake
- Running several unadjusted pairwise tests, treating ANOVA and Kruskal–Wallis as identical estimands, or interpreting an overall result as proof that every group differs.
4. Two categorical variables
- Research question
- Are program group and response category associated?
- Data structure
- One group variable and one categorical outcome; each independent participant contributes to one table cell.
- Design check
- Categories must be mutually exclusive and observations independent; matched or repeated outcomes need another method.
- Starting method
- Chi-square when its approximation is suitable, or Fisher’s exact test for a sparse 2×2 table.
- Common mistake
- Testing percentages without counts or choosing from observed counts without reviewing expected counts and design.
5. Two numeric variables
- Research question
- Is biomarker concentration associated with a continuous physiological response?
- Data structure
- Two numeric variables measured as one complete pair per independent participant.
- Design check
- Inspect a scatterplot for form, unusual observations, restricted range, and clusters before calculating a coefficient.
- Starting method
- Pearson correlation for a linear association; Spearman correlation for a monotonic rank association when that is the scientific target.
- Common mistake
- Selecting Pearson or Spearman from separate normality tests, ignoring nonlinearity, or interpreting correlation as causation.
Compare two groups
Two independent groups
Use Welch’s independent two-sample t-test for one numeric outcome in two separate groups when the question concerns a difference in means. It does not assume equal variances. Check independence, outliers, and whether a mean comparison is scientifically meaningful.
Use the Wilcoxon rank-sum (Mann–Whitney U) test for a rank-based comparison of two independent groups with a numeric or ordinal outcome. It compares distributions through ranks; a significant result should not automatically be described as a difference in medians unless the distributional context supports that interpretation. Follow the independent symptom-score worked example to see pooled ranks and ties.
Two matched measurements
Use a paired t-test when each observation is a correctly matched pair, such as before-and-after measurements from the same participant. The analysis concerns the within-pair differences, so review the distribution and outliers of those differences.
Wilcoxon signed-rank is a rank-based paired alternative. Its usual location-shift interpretation assumes that nonzero paired differences are symmetrically distributed; zero differences are not ranked.
Compare three or more groups
One-way ANOVA
Use one-way ANOVA for one numeric outcome in three or more independent groups when the question is whether group means differ. A significant overall ANOVA indicates evidence that at least one mean differs, but follow-up comparisons are needed to identify where differences lie. Review independence, outliers, within-group distributional shape, and variance homogeneity. When variances differ importantly, consider a method designed for unequal variances, such as Welch ANOVA.
Kruskal–Wallis test
Use Kruskal–Wallis for three or more independent groups with a numeric or ordinal outcome when a rank-based comparison is appropriate. It tests for differences among group rank distributions. Dunn pairwise comparisons with a multiple-testing adjustment are one possible follow-up after a significant overall test.
Study the relationship between two variables
Pearson correlation
Use Pearson correlation to describe a linear association between two numeric variables. Inspect a scatterplot first: curvature, influential outliers, or non-independent observations can make a correlation misleading. Correlation does not establish causation or adjust for confounding.
Spearman correlation
Use Spearman correlation when the question concerns a monotonic rank association between two ordinal or numeric variables. It can be useful for a monotonic relationship that is not linear, but it does not solve problems caused by non-independence, outliers, or confounding.
Analyze two categorical variables
Chi-square test of independence
Use a chi-square test when both variables are categorical and each observation belongs in one contingency-table cell. Observations should be independent, categories mutually exclusive, and expected cell counts checked before relying on the chi-square approximation.
Fisher’s exact test
For a 2×2 contingency table, Fisher’s exact test is particularly useful when expected counts are small and the chi-square approximation may be unreliable. The appropriate approach for larger tables depends on table size, study design, and the available computational method.
Repeated measurements and time-to-event outcomes
Random-intercept linear mixed model
Use a random-intercept linear mixed model when the same participant, animal, or sample is measured repeatedly over time and the outcome is numeric. A common specification includes a random intercept for the participant or sample ID and fixed effects for treatment group, time, and their interaction. More complex designs may require different random-effects or covariance structures.
Kaplan–Meier curve and log-rank test
Use Kaplan–Meier methods when the outcome is time until an event and some observations may be right-censored. The curve estimates survival over time; the log-rank test compares survival curves across groups. Define the time origin and event clearly, consider the assumption of non-informative censoring, and remember that these methods do not adjust for covariates. Follow the complete Kaplan–Meier and log-rank worked example for participant-level recurrence and censoring data.
When to seek additional statistical support
This guide is a useful starting point for common research questions, but some designs need a tailored analysis plan. Consider consulting a statistician before choosing an analysis if your study involves clustering, repeated treatments, multiple outcomes, substantial missing data, covariate adjustment, a complex survival or longitudinal design, or a pre-registered analysis plan.
Before you run any test
- Define the estimand and primary outcome before examining the result.
- Confirm whether observations are independent, paired, or repeated.
- Inspect the data and plot it; no test output replaces data-quality checks.
- Report effect sizes and confidence intervals where available, not only p-values.
- Account for multiple comparisons when making many inferences.
Related resources
For a closer look at choosing between a two-sample t-test and one-way ANOVA for independent groups, read T-test vs. ANOVA: How to Choose for Comparing Group Means. For the design distinction between matched and separate observations, read Paired vs. Independent Samples: How Study Design Changes Your Statistical Test. For choosing a correlation summary, read Pearson vs. Spearman Correlation: Which Measure of Association Should You Use?. For choosing a test for two categorical variables, read Chi-square vs. Fisher’s Exact Test: How to Choose for Categorical Data. For an introduction to distributional shape and diagnostics, read What Is a Normal Distribution? A Practical Guide for Research Data.
References and further reading
- NIST/SEMATECH e-Handbook of Statistical Methods
- American Statistical Association statement on statistical significance and p-values
BioTabular’s editorial approach and scope explain how these educational resources are prepared and what they do not replace.