Group comparison
Paired Samples t-Test
Compares two measurements taken from the same people, or from matched pairs, by testing whether the average of the paired differences departs from zero.
Method summary
A paired samples t-test works on differences rather than on groups. Each row holds two values belonging to one person or one matched pair; the test subtracts them, then asks whether the mean of those difference scores is far enough from zero to rule out sampling variation. Because differencing removes whatever is stable about each respondent, the design detects smaller shifts than an independent samples t-test at the same sample size, and the advantage grows with the correlation between the two measurements. In YouReply Analyze the method asks for two columns and no grouping column. The result reports the t value, n - 1 degrees of freedom, the mean difference, the standard deviation of the differences, the number of complete pairs and descriptives for both columns. No assumption test is run here: homogeneity of variance has no meaning in this design, and the normality of the differences is left to you.
Which research questions does it answer?
- Did average knowledge scores change between the start and the end of a six-week programme?
- Of two packaging designs rated by the same respondents, did one receive higher scores?
- Did brand trust shift between the measurement taken before an ad was shown and the one taken after?
- Do respondents systematically rate their own organisation differently from the sector as a whole?
When should you use it?
- Two measurements of the same variable come from every participant: before and after, two time points, two stimuli.
- The units are matched rather than independent, such as spouses, siblings, or treatment and control cases paired on background variables.
- The quantity of interest is the average change within a person, not the gap between two sets of people.
- Both measurements use the same scale and the same units, which is what makes a difference score interpretable.
Required variable types
- Two continuous columns, both numeric and both set to the 'scale' measurement level on the Variable tab.
- Wide layout: one row per participant, with the two measurements in two separate columns. Long data, where measurements are stacked, cannot be used by this method.
- No grouping column is needed. The method has no independent variable; the comparison happens between two columns.
Key assumptions
- Correct pairing
- The two values in a row must really belong to the same person or the same matched pair. If rows are shifted, the test still returns a number, but the number no longer answers the research question.
- Normality of the difference scores
- Normality is expected of the distribution of the paired differences, not of the two measurements separately. Tolerance grows with the number of pairs (roughly 30 and up); marked skew and a handful of extreme differences are the real threats.
- Independence between pairs
- The two measurements inside a pair are dependent by design, which is the reason for using this test, but one pair must not inform another. Pairs drawn from the same classroom or household weaken this condition.
- Continuous measurements on a shared scale
- A mean difference is only interpretable when both measurements are at interval level and expressed in the same units. Subtracting scores from two unrelated scales produces a quantity with no meaning.
How YouReply checks these assumptions
- Correct pairing: The panel pairs the two columns by row position and does not verify that a row refers to one respondent. Keep an identifier column visible and check the pairing yourself in the Data tab grid.
- Normality of the difference scores: This method runs no assumption test, so the distribution of the differences is never screened for you. Normality tests exist as a separate method, so you can build the difference column with a derived-column rule on the Variable tab and test that column instead.
- Independence between pairs: The panel does not check this assumption automatically; the researcher evaluates it.
- Continuous measurements on a shared scale: The method picker looks for numeric columns in both fields. Columns that do not fit leave the method dimmed with a plain-language reason and the select button disabled, and the data requirements box spells out which of your columns qualify.
How the analysis is run
- 1Drag your CSV or XLSX file onto the panel; the two measurements should already sit side by side as two columns.
- 2Scan the rows in the Data tab grid: both values in a row must come from the same respondent, and you should decide how to handle rows where one of the pair is missing.
- 3On the Variable tab confirm that both columns are numeric with the right measurement level, and declare any missing-value codes there.
- 4Open the method picker on the Analysis tab, type the method name in the search box, or flip the 'Only ones that fit my data' switch to narrow the list.
- 5In the parameter form pick the first and second column, and switch from two-tailed to one-tailed if your hypothesis is directional; the sign of the mean difference tells you which column is higher.
- 6Run the analysis and read the collapsible result sections. Download the group means chart as PNG and the tables as XLSX, and note the library call and version on the computation credits card.
Statistics and tables produced
- t statistic and degrees of freedom
- Degrees of freedom are the number of pairs minus one (n - 1). What counts is complete pairs, not the number of people in the file.
- Significance (p) value
- The heading of the row states whether the test was two-tailed or one-tailed, and follows the direction you set in the parameter form.
- Mean difference and standard deviation of the differences
- Both are reported as separate rows, and together they are what the effect size is built from.
- Number of pairs
- How many complete pairs entered the analysis. A figure below what you expected means one of the columns has missing values.
- Descriptives for both columns
- Mean, median, mode and standard deviation for each measurement, so you can see the level of each one independently of the difference score.
- Group means chart
- A bar chart comparing the two measurement means is drawn above the tables and can be saved as a PNG.
Effect size and confidence intervals
- Cohen's d (dz)
- The panel labels this value Cohen's d, but it divides the mean difference by the standard deviation of the differences, which makes it the within-subjects quantity usually written dz. The familiar 0.20, 0.50 and 0.80 landmarks are a rough guide, yet dz grows as the correlation between the two measurements rises, so it is not on the same scale as a between-groups d. Say which version you are reporting.
No confidence interval for the mean difference is returned here. The one-sample t-test is the only method in the panel that produces an interval, and it is fixed at 95% for the mean difference. The effect size in this method is a single point estimate. If a journal asks for an interval, the mean difference, the standard deviation of the differences and the pair count in the result table are enough to work it out by hand; the panel will not do it for you.
Example research question and example result
The numbers below are a representative example, not data from a real study or a real user.
- Research question
- Illustrative example: in an advertising test, the same respondents rated brand trust (0-100) before and after watching a film. Did the level of trust move?
- Variables
- First measurement: brand trust before the film (continuous) · Second measurement: brand trust after the film (continuous) · Pairing unit: the respondent, with both measurements on one row
- Example result
- 96 complete pairs entered the analysis. Before the film the mean was 62.5 (SD = 11.2); after it, 66.3 (SD = 10.8). The differences averaged 3.8 with a standard deviation of 8.6, giving t(95) = 4.33, p < .001, dz = 0.44.
- Interpretation
- Trust averaged 3.8 points higher after the film, and a shift that size is hard to attribute to sampling variation. The spread of the differences (8.6) is more than twice the mean difference, which says the change was not uniform: while the average rose, some respondents moved the other way. A dz of 0.44 points to a moderate within-person effect. Whether a single exposure translates into purchasing behaviour is not something this test can answer.
Real output on a sample dataset
The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.
Training method trial (synthetic)
A hypothetical trial in which one hundred and fifty participants were assigned to three training arms. Pre test and post test are scored out of one hundred and study hours is a continuous measure. Because each person is measured twice, a paired comparison is also possible.
- Rows
- 150
- Columns
- participant_id, training_arm, pre_test, post_test, study_hours
The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.
Research question: Did the same participants score higher after the training?
- First variable
- pre_test
- Second variable
- post_test
- t statistic
- -10.59
- p value (two-tailed)
- < 0.001
- Degrees of freedom
- 149
- Cohen's d
- -0.865
- Mean difference
- -6.66
- Standard deviation of differences
- 7.70
- Paired observations
- 150
First measurement
- Mean
- 52.48
- Median
- 52.05
- Standard deviation
- 8.40
Second measurement
- Mean
- 59.14
- Median
- 59.80
- Standard deviation
- 10.88
Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260913
How to report the result
Brand trust was higher after the film (M = 66.3, SD = 10.8) than before it (M = 62.5, SD = 11.2), t(95) = 4.33, p < .001, dz = 0.44.
An example sentence close to APA style; the numbers are representative.
When you should not use it
- Not for three or more repeated measurements; testing them two at a time inflates the Type I error rate, and repeated measures ANOVA is the design's test.
- Not for comparing two sets of different people, where no difference score can be formed at all.
- With few pairs, a clearly skewed difference distribution or a couple of extreme differences distorts the result, and a rank-based test is the safer choice.
- If some respondents dropped out before the second measurement, the remaining complete pairs are a self-selected subsample and the mean difference is biased whenever attrition is not random.
- When both measurements are single Likert items, the mean of their difference is a questionable quantity.
- The test quantifies average change, not its cause; elapsed time, practice and order effects have to be handled by the design.
What to use when the assumptions are not met
- Wilcoxon Signed-Rank TestWhy: When the differences depart clearly from normality, or the measurements are ordinal; it works on signed ranks instead.
- Repeated Measures ANOVAWhy: When three or more measurements come from the same people, so all of them belong in one test.
- Independent Samples t-TestWhy: When the two measurements come from different people and nothing links one row's values.
- One-Sample t-TestWhy: When you have a single column to compare against a fixed benchmark, and you also want a 95% interval for the difference.
Frequently asked questions
- How do I tell whether my design is paired or independent?
- Ask what a row represents. If one row holds two values from the same person, the design is paired and this is your test. If a row is one person and a separate column records which group they belong to, the design is independent and you need the independent samples t-test. Measurements from different people can still be paired when they were matched deliberately, as with siblings or matched treatment and control cases.
- Will the panel warn me if the differences are not normal?
- It will not. This method runs no assumption check at all, and there is no counterpart to the Levene block you see in the independent samples t-test. To inspect the distribution, create the difference column with a derived-column rule on the Variable tab and run the normality tests method on it. If the skew is pronounced, the Wilcoxon signed-rank test fits better.
- Why is the effect size larger than in an independent samples t-test?
- The denominator is different. Here the mean difference is divided by the standard deviation of the differences, which shrinks as the two measurements become more strongly correlated, so the same mean difference yields a bigger number. This quantity is dz, and it does not share a scale with the between-groups d. When comparing two studies, check which version each one reported.
- What happens when a second measurement is missing for some people?
- Only complete pairs are analysed, so the pair count in the result can be lower than the number of respondents in the file. Check that figure on every run. If it is noticeably below what you expected, look at the pattern of missingness before interpreting the mean difference, because the analysis then describes only those who completed the follow-up.
References
- Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
- Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences
- Lakens, D. (2013). Calculating and Reporting Effect Sizes to Facilitate Cumulative Science: A Practical Primer for t-tests and ANOVAs
- scipy.stats.ttest_rel documentation
Try it with your own data
The free plan includes 50 analysis runs a month and needs no card.