Which Statistical Test Should I Use?
A guide to choosing a test for thesis data, with a worked paired t test and sample results.
Choose a test by starting with the research question, the outcome you measured and the design that produced the data. For example, comparing test scores from two different classes is a different problem from comparing scores from the same students before and after training. The second design creates pairs, and the analysis needs to use that information.
1. Identify what you want to estimate
Write the target in plain language before opening the software: a difference in means, an association between two variables, a difference in proportions or an adjusted relationship. Specify the unit of analysis and whether observations are independent, paired, repeated or clustered.
| Research question | Data and design | Method to consider |
|---|---|---|
| Do two separate groups differ in average score? | Numeric outcome, independent groups | Welch two-sample t test. |
| Did average score change for the same people? | Numeric outcome, one before-and-after pair per person | Paired t test on the within-person differences. |
| Do three or more groups differ in average score? | Numeric outcome, independent groups | One-way ANOVA, or Welch ANOVA when unequal variances are a concern. |
| Are two categorical variables associated? | Independent counts in a contingency table | Pearson chi-square test when expected counts support the approximation. Consider Fisher’s exact test for a sparse 2 × 2 table. |
| Do the same participants change their yes/no response? | Paired binary responses | McNemar’s test, with an exact version when discordant counts are small. |
| Are two numeric variables associated? | Independent observations, no covariate adjustment | Pearson correlation for a linear relationship. Spearman rank correlation for a monotonic association. |
Table 1. Common starting points. Confirm the assumptions and design before applying a method.
2. Check assumptions before running the test
Look at the data as well as the design. For a paired t test, check the distribution of the differences and look for influential outliers. For a two-group comparison, examine spread and outliers within each group. For a contingency table, inspect expected counts. A normality-test p-value alone is a poor basis for choosing a method. When the outcome is ordinal, check whether a rank-based or ordinal model addresses your question. A Mann–Whitney test generally compares ranks and does not automatically test a difference in medians.
If you need to adjust for other variables, consider regression suited to the outcome, such as linear regression for the conditional mean of a numeric outcome or logistic regression for a binary outcome. Clustered samples, survey weights and repeated measurements beyond two time points may need design-specific methods.
3. Set up a before-and-after comparison
Study question. Did the average assessment score change after a training workshop? The same 12 learners were assessed before and after. Scores are simulated for teaching. Match records by learner ID and compute after minus before for each complete pair.
Null hypothesis (H0). The population mean of the paired score differences is zero.
Alternative hypothesis (H1). The population mean of the paired score differences is different from zero. The example uses a two-sided test and a 5% significance level.
A paired t test fits because each learner contributes one numeric change and the learners are assumed independent of one another. With only 12 pairs, examine the distribution for strong asymmetry or extreme changes before relying on the t procedure.
R example. With paired scores stored in the same order, enter the after scores first so positive differences mean improvement. In SPSS, use the Paired-Samples T Test and put the after variable first. Keep the sign convention consistent when reporting.
before <- c(51, 57, 60, 64, 59, 67, 53, 62, 70, 56, 65, 58)
after <- c(57, 59, 63, 63, 64, 71, 53, 67, 72, 63, 68, 60)
t.test(after, before, paired = TRUE, conf.level = 0.95)
If an assessment is missing at either time point, record how many pairs were excluded and consider whether missingness could bias the result. This example has no missing pairs.
4. Report the estimate, uncertainty and test
Sample results paragraph. Scores increased by an average of 3.17 points after the workshop (95% CI 1.66 to 4.67), t(11) = 4.63, p < .001, based on 12 matched pairs. The interval lies above zero. Without a comparison group, the change cannot be attributed to the workshop alone.
| Complete pairs | Before mean | After mean | Mean change | 95% CI |
|---|---|---|---|---|
| 12 | 60.17 | 63.33 | 3.17 | 1.66 to 4.67 |
Table 2. Results from simulated scores. The confidence interval is for the mean of the paired differences. Values were calculated from the displayed scores.

A small p-value describes how incompatible the result is with the null model under its assumptions. It does not tell you whether a change of this size is educationally important. Interpret the estimated change against a meaningful benchmark and explain what the study design allows you to conclude.
References and further reading
R documentation. Student’s t-Test, including paired and Welch options.
R documentation. Fisher’s Exact Test for Count Data.