Calculator
Example Data Table
This example compares scores before and after a short training program.
| Pair | Before | After | After - Before |
|---|---|---|---|
| 1 | 78 | 84 | 6 |
| 2 | 82 | 87 | 5 |
| 3 | 85 | 90 | 5 |
| 4 | 90 | 92 | 2 |
| 5 | 88 | 91 | 3 |
| 6 | 76 | 81 | 5 |
| 7 | 95 | 98 | 3 |
| 8 | 89 | 94 | 5 |
Formula Used
For paired values X and Y, first calculate each paired difference.
Difference: dᵢ = Yᵢ - Xᵢ, or Xᵢ - Yᵢ when selected.
Mean difference: d̄ = Σdᵢ / n
Standard deviation: sᵈ = √[Σ(dᵢ - d̄)² / (n - 1)]
Standard error: SE = sᵈ / √n
Test statistic: t = (d̄ - μ₀) / SE
Degrees of freedom: df = n - 1
Confidence interval: d̄ ± t critical × SE
Cohen dz: dz = d̄ / sᵈ
How to Use This Calculator
Enter matched values in the before and after fields. Keep every row paired with the same subject, item, or trial.
Select the difference direction. Choose After - Before when you want improvement to appear as a positive value.
Enter the hypothesized mean difference. Most paired t-tests use zero for no average change.
Choose the confidence level, alpha level, and alternative hypothesis. Press Calculate to view the result above the form.
Use Download CSV for spreadsheet work. Use Download PDF for a simple report.
Dependent Samples T-Test Guide
What This Test Measures
A dependent samples t-test compares two related measurements. The same subject may be tested before and after treatment. Two matched subjects may also form one pair. The test studies the average paired difference, not two separate averages. This design removes much subject variation. It can reveal small changes with better precision.
When It Is Useful
Use this calculator for repeated scores, medical readings, training results, machine trials, survey panels, or matched case studies. Each value in the first list must match the value in the second list. Missing pairs should be removed or corrected before testing. The order of rows matters because every difference is calculated within a pair.
Understanding The Output
The t statistic shows how far the mean difference is from the hypothesized difference. It is measured in standard error units. The p value estimates how unusual the result is under the null claim. A small p value gives evidence against that claim. The confidence interval gives a practical range for the true mean difference.
Effect Size And Direction
The calculator also reports Cohen's dz. This effect size divides the mean difference by the sample standard deviation of differences. It helps compare results across studies. A positive value follows the chosen difference direction. Change the direction when your question treats the first measurement as the outcome.
Good Practice
Check the differences for extreme outliers. The test assumes paired differences are roughly normal, especially with small samples. Large samples are usually more forgiving. Statistical significance should not replace judgment. Always compare the interval and effect size with the real cost, risk, or benefit of the change.
Data Quality Tips
Use the same units in both columns. Do not mix percentages with raw scores. Keep pair labels when rows represent people or items. Review zero differences because they affect variance less than large changes. Report the chosen alternative before reading the p value.
Interpreting Decisions
A reject decision means the observed evidence conflicts with the null difference at the selected alpha level. A fail to reject decision means evidence was not strong enough. It does not prove there is no change. The sample may be small, noisy, or poorly matched.
FAQs
1. What is a dependent samples t-test?
It is a test for two related sets of values. It checks whether the average paired difference is different from a hypothesized value, usually zero.
2. When should I use this calculator?
Use it for before-and-after data, repeated measures, matched subjects, paired machine trials, or any situation where each value has a direct partner.
3. How should I enter my data?
Enter before values and after values in the same order. You can also paste paired rows. Each row should contain one before value and one after value.
4. What does the p value mean?
The p value shows how unusual your sample result would be if the null hypothesis were true. Smaller values give stronger evidence against the null claim.
5. What is the null hypothesis?
The null hypothesis says the true mean paired difference equals the hypothesized difference. In most practical tests, that value is zero.
6. What is Cohen dz?
Cohen dz is an effect size for paired data. It divides the mean difference by the sample standard deviation of the paired differences.
7. Why does direction matter?
Direction controls whether the calculator subtracts before from after, or after from before. It changes the sign of the mean difference and t statistic.
8. Can I export the results?
Yes. Use the CSV button for spreadsheet data. Use the PDF button to save a simple report with the main statistics and paired details.