T-Test: Which One to Use and How to Read It on Survey Data
Research methods
Mike Taylor Dec 4, 2026 Reading time ≈ 20 min
Contents
- What a t-test tells you
- Types of t-test: independent, paired and one-sample
- Welch's t-test or Student's t-test?
- T-test formula and a worked example
- Paired t-test example: before and after a training
- Effect size: Cohen's d for a t-test
- Assumptions of the t-test
- Which test for which survey question
- How to report a t-test result
- Common mistakes with t-tests on survey data
- How to run a t-test on SurveyNinja data
- Frequently asked questions
A t-test is a statistical test that checks whether the difference between two means is larger than random sampling alone would produce. In survey work it answers questions like "Do returning customers rate us higher than new ones?" or "Did scores rise after the training?" This guide shows which t-test to pick, the formula worked by hand on example data, the effect size and how to report the result.
Key points
- Use the independent-samples t-test for two separate groups, the paired t-test for the same people measured twice and the one-sample t-test to compare one group with a fixed target.
- For two independent groups, Welch's t-test is the safer default: it does not assume that both groups spread equally.
- A t-test needs scores you can average, such as a 1–10 rating or a scale score built from several items. For a single 5-point item, run a Mann-Whitney test alongside it.
- The p-value tells you how surprising the gap would be if the true means were equal. Cohen's d tells you how big it is. Report both.
What a t-test tells you
A t-test compares the gap between two means with the noise around that gap. The statistic t is the difference divided by its standard error, so it counts how many standard errors apart the two means are. The further t is from zero, the less likely a gap of that size would be if the two population means were equal.
"The means are equal" is the null hypothesis (see our guide to the research hypothesis). The p-value is the probability of a gap at least as large as yours if that hypothesis were true. It is neither the probability that the hypothesis is true nor the chance that your result is a fluke, as the article on the p-value explains.
The t-test works on numbers that can be averaged: ratings on a 0–10 or 1–10 scale, scale scores, minutes, amounts. It does not fit yes/no answers or categories such as "preferred channel". For those, compare shares with a chi-square test.
Types of t-test: independent, paired and one-sample
There are three t-tests, and your survey design picks one for you: who answered, and how many times. The data look alike in all three cases, columns of ratings, so decide from the design, never from the numbers.
| Test and when to use it | Survey example |
|---|---|
| Independent samples (Welch). Two separate groups of respondents | Satisfaction of new vs returning customers |
| Paired samples. The same people answer twice, or answers come in matched pairs | Confidence before and after a training |
| One-sample. One group against a fixed value | Is the average rating different from the target of 8? |
Each test has its own degrees of freedom. The one-sample test uses n − 1, and so does the paired test, where n is the number of pairs. For independent samples, Welch's test takes them from the Welch–Satterthwaite formula, which usually does not give a whole number.
If you can match the answers person by person, the test is paired, even when the two waves sit in separate files. The paired example below shows what the wrong choice costs.
Welch's t-test or Student's t-test?
For two independent groups, use Welch's t-test unless the design guarantees equal variances. Student's classic version pools both variances into one estimate, which is only valid when the groups really spread equally.
The NIST/SEMATECH e-Handbook of Statistical Methods gives both formulas and notes that the Welch–Satterthwaite degrees of freedom hold up when group sizes or variances differ. A 2017 paper by Delacre, Lakens and Leys in the International Review of Social Psychology argues that Welch's test should replace Student's as the default: when the smaller group has the larger variance, Student's test produces too many false positives. They also advise against choosing the test after a variance check such as Levene's test, which often misses real differences in spread.
T-test formula and a worked example
Welch's t is the difference between the two means divided by the standard error of that difference: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂), where x̄ is a group mean, s² its sample variance and n its size. The example below uses illustrative data you can paste into the calculator.
An online store asks "How satisfied are you with your order?" on a 1–10 scale (1 = not at all satisfied, 10 = completely satisfied). Example data: 12 new customers answered 7, 5, 8, 9, 6, 4, 8, 7, 10, 6, 5, 9, and 15 returning customers answered 8, 9, 8, 8, 10, 9, 7, 8, 9, 7, 8, 9, 10, 8, 8.
| New customers (A) | Returning customers (B) | |
|---|---|---|
| n | 12 | 15 |
| Mean | 84 / 12 = 7.00 | 126 / 15 = 8.40 |
| Sum of squared deviations | 38 | 11.6 |
| Variance s² | 38 / 11 = 3.455 | 11.6 / 14 = 0.829 |
| Standard deviation s | 1.86 | 0.91 |
| s² / n | 0.2879 | 0.0552 |
- Standard error of the difference: √(0.2879 + 0.0552) = √0.3431 = 0.586.
- t: (7.00 − 8.40) / 0.586 = −2.39.
- Degrees of freedom: 0.3431² / (0.2879²/11 + 0.0552²/14) = 0.1177 / 0.00775 = 15.19.
- p-value: the two-sided probability of |t| ≥ 2.39 on a t distribution with 15.19 degrees of freedom is 0.030.
- Confidence interval: the critical t for 95% and 15.19 df is 2.129, so the difference of 1.40 points has a 95% interval of 1.40 ± 2.129 × 0.586, from 0.15 to 2.65.
With alpha set at .05 before collecting data, p = .030 means you reject the hypothesis of equal means: returning customers rate their orders higher. Paste the two lists into the free t-test calculator, new customers as Group A, and it shows t = −2.39, df = 15.2 and p = 0.0302. The minus sign only says that A has the lower mean. The variance and SD steps are explained in the standard deviation guide.
Student's version on the same answers gives t(25) = −2.57 and p = .017. Here the smaller group has about four times the variance of the larger one, which is exactly when Student's test is too optimistic.
Paired t-test example: before and after a training
A paired t-test is a one-sample t-test on the differences: compute each person's change, then test whether the mean change differs from zero. Ten employees answered "How confident are you using the new CRM?" (1 = not at all confident, 10 = fully confident) before and after a training. Example data:
| Employee | Before | After | Change |
|---|---|---|---|
| 1 | 4 | 5 | 1 |
| 2 | 8 | 8 | 0 |
| 3 | 5 | 7 | 2 |
| 4 | 6 | 7 | 1 |
| 5 | 3 | 4 | 1 |
| 6 | 7 | 9 | 2 |
| 7 | 5 | 5 | 0 |
| 8 | 6 | 7 | 1 |
| 9 | 4 | 5 | 1 |
| 10 | 7 | 8 | 1 |
| Mean | 5.50 | 6.50 | 1.00 |
The changes add up to 10, so the mean change is 1.00. Their squared deviations from 1.00 sum to 4, which gives a variance of 4 / 9 = 0.444 and a standard deviation of 0.667. The standard error is 0.667 / √10 = 0.211, so t = 1.00 / 0.211 = 4.74 with 9 degrees of freedom, and p = .001. The 95% interval for the mean change is 1.00 ± 2.262 × 0.211, from 0.52 to 1.48 points.
Our calculator runs Welch's test for two independent groups, and its page rightly warns against pasting before and after scores as two groups. A workaround still gives the exact paired result: paste the ten changes into Group A and 0, 0 into Group B (each group needs at least two values; any number of zeros gives the same result). With no spread in Group B, Welch's formula reduces to the one-sample t on the changes: t = 4.743, df = 9, p = 0.0011. The result panel still says "Welch's t-test" and "Mean B 0"; in your report, call it a paired t-test. The same workaround runs a one-sample test: the returning customers' ratings in Group A and the target 8 twice in Group B give t = 1.70, df = 14, p = .11, so their mean of 8.4 is not clearly above target.
Now run the same scores as if they came from two separate groups. Welch's test returns t = 1.38 and p = .18, and the improvement disappears. The independent test treats the large differences between people (from 3 to 8 before the training) as noise, while the paired test removes them by looking only at each person's change.
Effect size: Cohen's d for a t-test
Cohen's d expresses the gap in standard deviations, so it tells you how large a difference is, which the p-value cannot. For two independent groups, d is the difference in means divided by the pooled standard deviation.
In the store example the pooled SD is √((11 × 3.455 + 14 × 0.829) / 25) = √1.984 = 1.41, so d = (8.40 − 7.00) / 1.41 = 0.99. Enter both means, SDs and group sizes into the effect size calculator to get d = 0.99 and Hedges' g = 0.96, the version corrected for small samples. For the paired example there are two versions. dz divides the mean change by the SD of the changes: 1.00 / 0.667 = 1.50. dav divides it by the average of the before and after SDs: 1.00 / 1.62 = 0.62.
Cohen suggested 0.2, 0.5 and 0.8 as small, medium and large effects. In a 2013 tutorial in Frontiers in Psychology, Daniël Lakens calls these benchmarks arbitrary and warns against reading them rigidly. He also shows that dz grows when before and after scores are strongly correlated, as they are here, and recommends dav when you want to compare a paired result with studies of separate groups. Your own history is a better yardstick than any benchmark, for example the gap between last year's waves.
Effect size matters most in large surveys. With 2,000 respondents per group and an SD of 1.5, a gap of 0.1 points on a 1–10 scale gives t = 2.11 and p = .035, yet d is only 0.07: significant, but probably too small to act on.
Assumptions of the t-test
A t-test assumes independent observations, a numeric outcome and means that behave roughly like a normal distribution, either because the answers are close to normal or because each group is large enough. Student's version adds equal variances; Welch's does not need them.
- Independence. Each respondent appears once per group, so remove duplicate submissions first. In a paired test, the pairs must be independent of each other.
- A score you can average. A scale score averaged over several Likert items, time, money or a 0–10 or 1–10 rating. A single rating item is ordinal in theory; with 10 or 11 points it is commonly treated as numeric, as in the examples here. The mean, median and mode guide covers when a mean makes sense.
- Normality or size. Penn State's STAT 200 course notes say the t distribution can be used if the populations are approximately normal or if both samples are at least 30. Treat 30 as a course rule of thumb. With small groups, look at the distribution first, because one extreme answer moves a mean of ten far more than a mean of three hundred. In a paired test, look at the changes.
- A random sample, if you generalize. With an opt-in survey, a significant t describes people like those who answered; it says little about customers who never open your surveys.
Single Likert items are the grey area. In a 2010 simulation study in Practical Assessment, Research, and Evaluation, de Winter and Dodou compared the t-test with the Mann-Whitney test on 5-point items from 14 distributions. Both had similar power for most pairs, and false positives never exceeded the nominal 5% by more than 3 points. Mann-Whitney had more power when one sample was skewed or peaked, and the tests diverged strongly when answers split into camps. So for a single 5-point item, run Mann-Whitney next to the t-test; for a scale score built from several items (see the Likert scale guide), the t-test is a reasonable choice. On the store example, Mann-Whitney also finds the gap, with p just under .05.
Which test for which survey question
Pick the test from the question type and the design before you look at the results.
| Question and design | Test | Example |
|---|---|---|
| 0–10 or 1–10 rating, two separate groups | Welch's t-test | Satisfaction of new vs returning customers |
| The same rating, same people twice | Paired t-test | Confidence before and after a training |
| One group against a target | One-sample t-test | Average rating vs a target of 8 |
| Scale score from several Likert items, two groups | Welch's t-test | Engagement index in two offices |
| Single 5-point item, two groups | Mann-Whitney and the t-test side by side | "The app is easy to use", two app versions |
| Yes/no or a choice, two or more groups | Chi-square test | Preferred channel by age group |
| A rating in three or more groups | One-way ANOVA (Welch's version) | Satisfaction in four regions |
The last row matters because running a t-test for every pair of groups inflates false positives. Ten tests at alpha .05 give about a 40% chance of at least one false alarm if the tests are independent.
How to report a t-test result
Report the group means with SDs and sizes, then the test, the degrees of freedom, t, the exact p-value and the effect size. In APA style it fits in one sentence. For the two examples:
Returning customers rated their satisfaction higher (M = 8.40, SD = 0.91, n = 15) than new customers (M = 7.00, SD = 1.86, n = 12), Welch's t(15.19) = 2.39, p = .030, d = 0.99, 95% CI of the difference [0.15, 2.65].
Confidence in using the CRM rose after the training from M = 5.50 (SD = 1.58) to M = 6.50 (SD = 1.65), paired t(9) = 4.74, p = .001, mean change 1.00, 95% CI [0.52, 1.48], dav = 0.62 (dz = 1.50).
Report a non-significant result in the same format. Write that the data do not show a clear difference, and give the interval: it shows how large a difference the data still allow. For a thesis, the guide to the statistical treatment of data shows how to describe the tests in the method chapter.
Common mistakes with t-tests on survey data
Check these before you report.
- Decide the test, alpha and one- or two-sided before you see the data. The calculator reports a two-sided p; the p-value article explains when one side is justified.
- Report d and the confidence interval next to p.
- Running an independent test on before-and-after answers from the same people.
- Averaging category codes such as 1 = email, 2 = phone, 3 = chat and testing the means.
- Reading p = .03 as a 3% chance that the groups are equal, or p = .18 as proof that they are equal.
- Testing every pair of segments and reporting only the significant comparisons.
- Generalizing from an opt-in sample to all customers without saying who answered.
How to run a t-test on SurveyNinja data
Collect the score with a rating scale question, for example 1–10, and add one question that defines the groups, such as "Is this your first order with us?". The customer satisfaction survey template is a ready starting point. Export the responses to CSV, XLSX or SPSS, which is available on every plan, including Free. Split the rating column by group in a spreadsheet and paste the two columns into the t-test calculator, which is free and works without an account.
For a before-and-after design, the training feedback survey template works for both waves; add a question for the respondent's own code so the two answers can be matched. On Premium and Enterprise, the AI report (Smart Analytics, Beta) needs at least 5 completed responses; it compares a rating across the two largest groups of a single-answer question, each with at least 5 people, and labels the strength of the gap with Cohen's d. For t and the p-value, use the calculator. To start, create a survey for free: sign-up asks only for an email and a password.
Frequently asked questions
What is a t-test in simple terms?
A t-test checks whether the difference between two averages is bigger than random sampling would usually produce. It divides the gap between the means by its standard error. In surveys it compares, for example, the average rating of two customer groups, or of the same people before and after a change.
When should you use a t-test?
Use a t-test when the answer is a number you can average, such as a 1–10 rating or a scale score, and you compare exactly two means: two separate groups, the same people twice, or one group against a target. For yes/no or category answers use a chi-square test; for three or more groups, ANOVA.
What is the difference between a paired and an independent t-test?
A paired t-test is for the same people measured twice, or for matched pairs, and it tests the mean of each person's change. An independent t-test compares two separate groups. Using the independent test on paired data treats differences between people as noise: in this article's training example, p = .001 becomes p = .18.
Should I use Welch's or Student's t-test?
Use Welch's t-test for two independent groups unless the design guarantees equal variances. It loses little when variances are equal and protects against false positives when the smaller group has the larger spread. Delacre, Lakens and Leys (2017) recommend it as the default. In SPSS, read the row Equal variances not assumed.
Can you use a t-test on Likert scale data?
Yes for scale scores averaged over several Likert items. For a single 5-point item, a 2010 simulation by de Winter and Dodou found that the t-test and the Mann-Whitney test usually perform similarly, with Mann-Whitney stronger when answers are skewed or bunched on one value. Run both and report any disagreement.
What does the t value mean in a t-test?
The t value is the difference between the means expressed in standard errors. A t of −2.39 means the means are 2.39 standard errors apart, with the first group lower. The verdict depends on t and the degrees of freedom: with 15 degrees of freedom, |t| above about 2.13 gives p below .05 in a two-sided test.
Published: Dec 4, 2026

