Which Statistical Test Should I Use?
Answer a few questions about your variables and find the right test for your analysis. Follow the interactive decision tree below, or jump to the static lookup table if you already know what you're looking for.
Variable Types: A Quick Reference
Before starting, make sure you can classify your own variables. Here are the four types:
- Nominal (categorical)
- Categories with no natural order. E.g., blood type (A, B, AB, O), major (biology, history, engineering), gender (male, female, non-binary).
- Ordinal (ranked)
- Categories in a meaningful order, but intervals between them are not equal. E.g., survey responses (strongly disagree, disagree, neutral, agree, strongly agree), education level (high school, bachelor's, master's, PhD).
- Interval
- Numerical data where the intervals are equal, but there is no true zero. E.g., temperature in Celsius (0°C is just a point, not "no temperature"), year (there is no year zero in common usage).
- Ratio
- Numerical data with equal intervals and a true zero point. E.g., height (0 cm means no height), weight (0 kg means no weight), age (0 years is birth), test score out of 100.
Tip: Interval and ratio data are often treated the same in practice and called "continuous" or "numeric" data. If you have a true zero, it's ratio; if not, it's interval.
Interactive Decision Tree
What are you trying to do?
How many groups or conditions are you comparing?
Are the groups independent or dependent?
What type of outcome variable do you have?
Is your numeric outcome roughly normally distributed?
What types are your two variables?
What type is your outcome variable?
§ The Static Lookup Table
If you know your variable types, find your test here. Rows represent your outcome type and group structure; columns show the recommended parametric test and its non-parametric fallback.
| Analysis Type | Outcome Type | Parametric Test | Non-Parametric Alternative |
|---|---|---|---|
| One sample vs. known value | Numeric | One-sample t-test | One-sample median (Wilcoxon signed-rank) |
| Categorical | Binomial test or chi-square goodness-of-fit | ||
| Two independent groups | Numeric | Two-sample t-test | Mann-Whitney U test |
| Ordinal | Mann-Whitney U test | ||
| Categorical | Chi-square or Fisher's exact | ||
| Two dependent groups (paired/repeated) | Numeric | Paired t-test | Wilcoxon signed-rank test |
| Ordinal | Wilcoxon signed-rank test | ||
| Categorical (binary) | McNemar test | ||
| 3+ independent groups | Numeric | One-way ANOVA | Kruskal-Wallis test |
| Ordinal | Kruskal-Wallis test | ||
| Categorical | Chi-square test of independence | ||
| 3+ dependent groups (repeated measures) | Numeric | Repeated measures ANOVA | Friedman test |
| Ordinal | Friedman test | ||
| Relationship between two variables | Both numeric, linear | Pearson correlation | Spearman correlation |
| At least one ordinal or non-linear | Spearman correlation | ||
| Both categorical | Chi-square test of independence | ||
| Predict numeric outcome | Numeric (continuous) | Linear regression (simple or multiple) | |
| Predict binary outcome | Binary (yes/no) | Logistic regression (simple or multiple) | |
| Describe one sample | Numeric | Mean, standard deviation, and confidence interval | |
| Categorical | Proportion and confidence interval | ||
§ Parametric vs. Non-Parametric in One Paragraph
Parametric tests (t-test, ANOVA, Pearson correlation) assume your outcome is normally distributed and may assume equal variances across groups. They are more powerful (better at detecting real effects) when assumptions hold. Non-parametric tests (Mann-Whitney U, Wilcoxon, Spearman, Kruskal-Wallis) make fewer assumptions and work on ranks or categories, so they're safer when your data is skewed, has outliers, or is ordinal. However, they're slightly less powerful when your data is truly normal. A modern rule of thumb: use the parametric test if your outcome is numeric and either the data is roughly normal or you have at least ~30 observations per group (so the Central Limit Theorem saves you). Otherwise, use the non-parametric version.
§ What to Do When Your Assumptions Fail
Non-normal data? Check the sample size. If n ≥ 30 per group, proceed with the parametric test—the Central Limit Theorem makes the test robust. If n < 30, make a plot (histogram, Q-Q plot) to decide: if it's only slightly skewed, parametric is usually still fine; if it's heavily skewed or has extreme outliers, use the non-parametric alternative.
Unequal variances? For t-tests, use Welch's t-test (which doesn't assume equal variances) instead of Student's t-test. For ANOVA, the same idea applies (Welch's ANOVA). These are the modern default.
Categorical outcome? Chi-square tests require at least 5 observations in each cell. If you have cells with expected counts < 5, use Fisher's exact test (for 2×2 tables) or consider collapsing categories if it makes scientific sense.
Dependent observations? Never ignore dependence (e.g., repeated measures, matched pairs, clustered data). Using an independent test on dependent data will underestimate uncertainty and give false confidence. Always use the matched or repeated-measures version of the test.
§ Frequently Asked Questions
How do I know if my data is normal?
Make a histogram or Q-Q plot. A histogram should look roughly bell-shaped; a Q-Q plot should show points close to a diagonal line. You can also run a Shapiro-Wilk test or Kolmogorov-Smirnov test, but these are sensitive to sample size—with huge samples, trivial deviations from normality will "reject" normality, and with small samples, the test has low power. Use the plot plus your sample size as a guide. If n ≥ 30, mild departures from normality are okay.
What's the difference between ordinal and nominal data?
Ordinal data has a meaningful order (e.g., 1 = strongly disagree, 5 = strongly agree). Nominal data does not (e.g., red, blue, green—no order). The test you choose depends on whether order matters. For ordinal data, Mann-Whitney or Spearman are often better than chi-square. For nominal data, chi-square is the standard.
Do I have to test the assumptions first?
No formal "assumption test" is required before running your analysis. Instead, (1) think about your design (are observations independent?), (2) look at the data (is it roughly normal, are there outliers?), and (3) know your sample size. Run the parametric test if it's reasonable; if you're uncertain, compare it to the non-parametric version. Modern practice focuses less on formal assumption tests and more on visual inspection and robustness.
What if I'm comparing two groups and I'm not sure whether they're independent or dependent?
They are independent if each person contributes one observation, and different people are in group A vs. group B. They are dependent if the same person (or matched pairs) appear in both groups (e.g., before and after treatment). If you're still unsure, ask: "Could I match observation A to observation B?" If yes, they're dependent; if not, they're independent.
Why does my textbook recommend test X, but this tool says test Y?
Different sources may emphasize different tests based on their discipline and when they were written. For example, some fields traditionally use one-way ANOVA for 3+ groups, while others prefer Kruskal-Wallis by default. This tool follows modern consensus from sources like UCLA OARC and emphasizes the best choice for your actual data type and assumptions. When in doubt, discuss your choice with your instructor.
Can I use this tool for multivariate analyses (multiple outcomes or predictors)?
This tool focuses on univariate tests (one outcome). If you have multiple outcomes, you would use MANOVA. If you have multiple predictors and one numeric outcome, use multiple regression; for binary outcomes, use multiple logistic regression. These are beyond the scope of this decision tree, but the same principle applies: think about your outcome type and predictors, then choose the test.
§ Sources
This tool was developed using the following sources:
- UCLA Statistical Consulting: Choosing the Correct Statistical Test — Decision framework, test recommendations, and non-parametric alternatives.