Short answer
Which statistical test to use
Four questions decide almost every test. What kind of outcome variable do you have — continuous, ordinal or categorical? Are you comparing groups, testing an association, or predicting? How many groups, and are they independent or paired? And do the data meet the assumptions of a parametric test?
Answer those in order and the test is usually determined rather than chosen.
Start with the question, not the data
The commonest way to get this wrong is to look at the dataset and ask what can be run on it. Start instead with the research question, because the question determines the family of test and the data determine which member of that family.
There are three families. Comparison — do these groups differ? Association — do these variables move together? Prediction — can I estimate one variable from others? Almost every undergraduate and master's analysis is one of these three.
Write your question as a sentence with the variables named before you open the software. 'Do students who used the revision app score higher on the final exam than those who did not?' contains the outcome, the grouping variable, and the fact that the groups are independent.
Question one: what is your outcome variable?
Level of measurement decides more than anything else, and it is the step people rush.
- Continuous (interval or ratio) — exam scores, reaction times, blood pressure. Parametric tests are available.
- Ordinal — Likert items, pain scales, rankings. Ordered, but the gaps between points are not equal. Non-parametric tests.
- Nominal categorical — treatment group, blood type, yes/no. Frequencies and proportions only.
- Count — number of events in a period. Often needs Poisson or negative binomial rather than a t-test.
- Time to event — how long until something happens, with some cases not yet having had it. Survival analysis.
Question two: comparing, associating or predicting?
Comparison asks whether groups differ on an outcome. The grouping variable is categorical and the outcome is what you measured.
Association asks whether two variables vary together, with no grouping. Correlation is the basic form.
Prediction asks whether one or more variables estimate an outcome, and adds the idea of controlling for other variables. Regression is the family.
The line between association and prediction is often about intent rather than mathematics — a simple regression and a correlation on the same two continuous variables give the same p value. Say which question you are asking and use the corresponding language in your write-up.
The decision table
With the outcome type and the question settled, this is usually determined. The non-parametric column is the alternative when assumptions fail.
| Design | Parametric | Non-parametric / categorical |
|---|---|---|
| Two independent groups, continuous outcome | Independent samples t-test | Mann-Whitney U |
| Two paired measurements, continuous outcome | Paired samples t-test | Wilcoxon signed-rank |
| Three or more independent groups | One-way ANOVA | Kruskal-Wallis |
| Three or more repeated measurements | Repeated measures ANOVA | Friedman |
| Two categorical variables | — | Chi-square test of independence (Fisher's exact if cells are small) |
| Two continuous variables, association | Pearson's r | Spearman's rho |
| Predicting a continuous outcome | Linear regression | — |
| Predicting a binary outcome | Logistic regression | — |
| Two factors, continuous outcome | Two-way ANOVA | Aligned rank transform |
Independent or paired: the question people skip
Independent means each observation comes from a different person or unit. Paired means the same person measured twice, or units matched deliberately.
Getting this wrong invalidates the analysis, and it is easy to get wrong. A before-and-after design is paired. Two conditions each participant completed is paired. Two different classes is independent.
Paired tests are more powerful when the design is genuinely paired, because they remove between-person variability. Running an independent test on paired data throws that away and usually loses the effect.
Watch for hidden non-independence: students within classes, patients within hospitals, repeated measures within participants. Clustered data needs a mixed model, not a t-test, and an examiner in a quantitative discipline will look for this.
Question four: do the assumptions hold?
Parametric tests assume the outcome is approximately normally distributed within groups, that variances are roughly equal across groups, and that observations are independent. Check each rather than assuming.
Normality: look at a histogram and a Q-Q plot. Formal tests like Shapiro-Wilk are oversensitive in large samples and underpowered in small ones, which is the opposite of useful. Report what you looked at.
Equal variances: Levene's test, and note that most software offers a version of the t-test and ANOVA that does not assume equal variances. Welch's t-test is a reasonable default and many statisticians now recommend it routinely.
Independence is a design property and cannot be fixed after the fact. If observations are clustered, the analysis has to account for it.
t-tests and ANOVA are fairly robust to moderate non-normality with reasonable sample sizes. Serious skew, small samples, or ordinal outcomes are the cases where the non-parametric alternative is the right call.
The chi-square family
Chi-square tests frequencies, not means, and comes in two forms students confuse. Goodness of fit compares one categorical variable against expected proportions. Test of independence compares two categorical variables.
It has its own assumption: expected cell counts should be five or more in most cells. Below that, use Fisher's exact test, which is exact rather than approximate and is available in every package for 2x2 tables.
Report the effect size — Cramér's V or the odds ratio for a 2x2 — because a chi-square on a large sample will be significant for a trivial association.
A significant chi-square tells you the variables are not independent. It does not tell you where the association is, which needs standardised residuals or a follow-up comparison.
After a significant ANOVA
An ANOVA tells you at least one group differs; it does not say which. Post hoc comparisons are the next step, and they must be corrected for multiple testing.
Tukey's HSD is the usual choice for all pairwise comparisons with equal group sizes. Bonferroni is more conservative and appropriate when you have a small number of planned comparisons. Games-Howell where variances are unequal.
Where you had specific hypotheses before collecting data, planned contrasts are more powerful and more defensible than running every pair. Say in your method that they were planned.
Sample size and power
A power analysis before data collection tells you how many participants you need to detect an effect of a given size. Doing one and reporting it is expected in most quantitative dissertations now.
Doing it afterwards — observed power calculated from your own result — is uninformative and is criticised in every methods text. If you did not run one in advance, say so as a limitation rather than computing one retrospectively.
A non-significant result in an underpowered study means nothing has been shown, not that there is no effect. Confidence intervals communicate this better than p values, and reporting them is increasingly required.
Reporting the result
Give the test, the statistic, degrees of freedom, exact p, an effect size, and a confidence interval where the software provides one. Then say what it means in a sentence of plain English.
APA form: t(48) = 3.21, p = .002, d = 0.91, 95% CI [0.32, 1.49]. Statistic and p in italics, numbers not.
Never write 'p = .000'. That is the software rounding; write p < .001.
Report what you did to the data before the test: exclusions, transformations, how missing values were handled. An analysis whose preprocessing is invisible cannot be evaluated.
When you are genuinely unsure
Draw the design before choosing the test. One box per variable, an arrow for the relationship you are testing, and a note of how many groups and whether the same people appear in more than one. The picture usually settles it.
Ask your supervisor early, with the design drawn, rather than after collecting data. The commonest irrecoverable statistics problem in a dissertation is a design that cannot answer the question, and it is only fixable before collection.
Where two tests are defensible, run the one you preregistered or planned, and report the other as a sensitivity check. Choosing the test after seeing which gives a significant result is p-hacking, and it is what preregistration exists to prevent.
Frequently asked questions
What is the difference between parametric and non-parametric?
Parametric tests assume a distribution — usually approximate normality — and test means. Non-parametric tests make fewer assumptions and generally test ranks or medians. Non-parametric tests are safer and slightly less powerful when the assumptions do hold.
Can I use a t-test on Likert data?
It is contested. A single Likert item is ordinal and Mann-Whitney is the safer choice. A scale summing several items is usually treated as continuous, and a t-test is widely accepted. Say which you did and why.
When do I use ANOVA instead of multiple t-tests?
Whenever you have three or more groups. Running three t-tests inflates the false positive rate to about 14%; ANOVA tests all groups at once and controls it.
Does a significant result mean my hypothesis is proven?
No. It means the data are unlikely under the null hypothesis. Report the effect size and confidence interval, and describe the finding in terms of evidence rather than proof.
What do I do if my data are not normal?
Look at how badly, and at your sample size. Moderate skew with n over 30 per group is usually fine for a t-test or ANOVA. Serious skew, small samples or ordinal outcomes point to the non-parametric alternative or a transformation.
Correlation or regression?
Correlation if you are describing an association between two variables symmetrically. Regression if one variable is an outcome you are predicting, or if you need to control for other variables.
Keep reading
Related guides
How to write a methodology chapter
A methodology chapter explains what you did and, more importantly, why that was the right way to answer your question.