Calculator Inputs
Paste numbers separated by commas, spaces, semicolons, or line breaks. Use paired mode for matched observations. Use unpaired mode for independent groups.
Plotly Graph
The chart updates after calculation. Paired mode draws matched series by pair. Unpaired mode shows box plots with all points.
Example Data Table
Use these worked examples to understand the input format and the matched versus independent structure.
Paired example
Each row contains a matched observation from the same subject.
| Subject | Before | After | Difference |
|---|---|---|---|
| 1 | 85 | 82 | 3 |
| 2 | 88 | 84 | 4 |
| 3 | 90 | 89 | 1 |
| 4 | 92 | 90 | 2 |
| 5 | 87 | 85 | 2 |
| 6 | 91 | 88 | 3 |
Unpaired example
These scores come from two independent groups.
| Group A | Group B |
|---|---|
| 72 | 68 |
| 75 | 70 |
| 79 | 72 |
| 81 | 74 |
| 76 | 71 |
| 78 | 69 |
Formula Used
This calculator supports the paired test, the pooled independent test, and Welch’s independent test. The null difference is usually zero, but you can change it.
Paired t test
For matched observations, first compute each difference di = xi − yi. The test checks whether the mean difference differs from the hypothesized value.
t = (d̄ − δ0) / (s_d / √n), with df = n − 1
Unpaired t test with equal variances
Use this when the samples are independent and their spread is reasonably similar. A pooled variance combines both sample variances into one estimate.
s_p² = [((n1 − 1)s1²) + ((n2 − 1)s2²)] / (n1 + n2 − 2)
t = [(x̄1 − x̄2) − δ0] / [s_p √(1/n1 + 1/n2)], with df = n1 + n2 − 2
Welch unpaired t test
Welch’s version is usually safer when sample sizes differ or variances are not close. It does not pool the variances and uses an adjusted degree of freedom.
t = [(x̄1 − x̄2) − δ0] / √(s1²/n1 + s2²/n2)
df = (a + b)² / [(a² / (n1 − 1)) + (b² / (n2 − 1))], where a = s1²/n1 and b = s2²/n2
How to Use This Calculator
Follow these steps to enter the data correctly and interpret the main outputs.
1. Choose the test type
Select paired for matched measurements such as before and after scores. Select unpaired for two independent groups.
2. Enter sample labels and values
Type meaningful names for the groups, then paste numeric observations into the two text areas. Commas, spaces, semicolons, and line breaks all work.
3. Set the test options
Choose the tail direction, the alpha level, the confidence level, and the hypothesized mean difference. In unpaired mode, choose Welch or pooled variance.
4. Run the test and review the output
The result section appears above the form after submission. Read the t statistic, p value, confidence interval, effect size, and descriptive table.
5. Export the analysis
Use the CSV button for spreadsheet work and the PDF button for reporting or sharing a fixed summary.
FAQs
These plain HTML answers cover common questions about selecting and interpreting the test.
1. What is an unpaired t test?
An unpaired t test compares the means of two independent groups. Use it when values in one sample are not naturally matched to values in the other sample, such as scores from two separate classes or treatments.
2. When should I use a paired t test?
Use a paired t test when each observation in one sample directly matches one observation in the other sample. Common examples include before and after measurements, twin studies, and repeated measures on the same participants.
3. How do I choose between Welch and pooled variance?
Welch is the safer default when group sizes or variances differ. Choose pooled variance only when the samples are independent and you have good reason to treat their population variances as similar.
4. What does the p value tell me?
The p value measures how unusual your sample difference would be if the null hypothesis were true. A small p value suggests stronger evidence against the null hypothesis at your chosen alpha level.
5. Why is effect size included?
Effect size helps you judge practical importance, not only statistical significance. Two studies can share the same p value but differ greatly in the size of the observed mean difference.
6. Can I run a one tailed test here?
Yes. Choose left tailed or right tailed when your alternative hypothesis has a specific direction. Use two tailed when any nonzero difference matters, regardless of the sign.
7. Do paired samples need the same number of values?
Yes. Paired analysis needs one value in the first sample for every value in the second sample. If the lists do not align one to one, use unpaired mode instead.
8. What assumptions matter most?
The key assumptions are independent observations, a roughly normal distribution of paired differences or group means, and correct pairing when using the paired test. Welch also relaxes the equal variance assumption for independent samples.