Before choosing any statistical test, you have to answer one design question: are the values in your groups independent of each other, or are they paired? Getting this wrong is one of the most common errors in published research, and it can make a very clear effect look like noise, or noise look like an effect. This guide explains how to tell the difference, shows with real numbers why it matters so much, and lists the right test for each case.
The difference in one sentence
Data is paired when every value in one group has a natural partner in the other group: the same person, animal, sample or location measured twice, or two subjects deliberately matched with each other.
| Paired (dependent) | Independent |
|---|---|
| Blood pressure of the same 20 patients before and after treatment | Blood pressure of 20 treated patients and 20 different untreated patients |
| Left eye vs right eye of each participant | Participants with vs without glasses |
| Two lab methods run on the same set of samples | Samples assigned randomly to one of two methods |
| Twins split between two conditions | Unrelated people in two conditions |
| Each cell culture plate split into treated and untreated wells | Separate plates for treated and untreated |
A useful test: could you draw a line connecting each value in group 1 to exactly one value in group 2, and would that line mean something? If yes, the data is paired.
Why it matters: a worked example
Five patients had their systolic blood pressure measured before and after a new treatment:
| Patient | Before | After | Change |
|---|---|---|---|
| 1 | 120 | 116 | −4 |
| 2 | 135 | 131 | −4 |
| 3 | 128 | 125 | −3 |
| 4 | 142 | 137 | −5 |
| 5 | 150 | 146 | −4 |
| Mean | 135.0 | 131.0 | −4.0 |
Every single patient went down by 3 to 5 mmHg. The effect is obvious. Now compare the two ways to analyse it:
| Independent t-test (wrong here) | Paired t-test (correct) | |
|---|---|---|
| What it compares | The two group means, using the spread between patients | The mean change within each patient |
| Relevant SD | ≈ 11.6 (patients differ a lot from each other) | 0.71 (the changes are very consistent) |
| t | 0.55 | 12.6 |
| Degrees of freedom | 8 | 4 |
| p | ≈ 0.60 | ≈ 0.0002 |
The independent test buries the 4 mmHg effect under the 30 mmHg differences between patients. The paired test removes those between-patient differences by looking only at each person's change, and the effect stands out clearly. This is the whole point of paired designs: each subject acts as their own control, which can make an experiment far more sensitive with the same number of participants.
The mistake can also go the other way. Treating repeated measurements as independent observations (for example, counting five measurements from each of four mice as n = 20) pretends you have more independent information than you do, which produces p-values that are too small. This error is called pseudoreplication.
Choosing the right test
| Design | Roughly normal data | Skewed data, outliers, ordinal |
|---|---|---|
| 2 independent groups | Welch's t-test | Mann-Whitney U |
| 2 paired measurements | Paired t-test | Wilcoxon signed-rank test |
| 3+ independent groups | One-way ANOVA | Kruskal-Wallis |
| 3+ measurements on the same subjects | Repeated-measures ANOVA (or a mixed model) | Friedman test |
For a paired t-test, the normality assumption applies to the differences, not to the raw values. Plotting a histogram of the differences is the quickest check.
Practical tips
- Keep partners on the same row. In a spreadsheet, put each subject on one row with the "before" value in one column and "after" in the next. Sorting one column on its own breaks the pairing.
- Missing partners. A paired test can only use subjects with both measurements. If many partners are missing, mention how many subjects were dropped.
- Technical replicates. Several measurements of the same sample are not independent. Average them first, then analyse one value per sample.
- Show the pairing in your graph. A "before–after" plot with a line connecting each subject's two values communicates paired data much better than two bars.
Running a paired analysis in StatFlo
- Put the two measurements in two columns of the same sheet (for example
BeforeandAfter), with one subject per row. StatFlo matches the values row by row, and a row missing either value is left out (the results say how many). - Upload the file or paste the cells, and select exactly those two columns.
- Choose Before–after plot (paired data) as the graph type: each subject is drawn as a line from one condition to the other, with the mean change in bold. It shows at a glance whether most subjects moved in the same direction.
- Under Statistical Test, choose Paired t-test for roughly symmetric differences, or Wilcoxon signed-rank test for skewed differences, outliers or ordinal scores.
The paired t-test reports t, df, p, the mean difference with its 95% confidence interval, the SD of the differences and Cohen's dz. The Wilcoxon test reports W, p, the median difference and the matched-pairs rank-biserial r; for small samples it uses an exact p-value. Both are checked against SciPy reference results. Running the worked example above through StatFlo gives exactly the numbers in the table: t(4) = 12.65, p = 0.0002, mean difference 4.0 (95% CI 3.1 to 4.9).
Prefer a spreadsheet? =T.TEST(before_range, after_range, 2, 1) in Excel or Google Sheets returns the two-sided p-value of a paired t-test (the final 1 means paired).