Example Data Table
| Case |
Test |
Sample 1 |
Sample 2 |
Null value |
Common use |
| Exam scores |
Welch two sample |
72, 75, 78, 74, 80, 77, 73, 76 |
68, 70, 69, 72, 71, 67, 73, 70 |
0 |
Compare two independent class groups |
| Before and after |
Paired sample |
85, 88, 90, 86, 91 |
80, 84, 87, 83, 88 |
0 |
Measure matched improvement |
| Quality check |
One sample |
10.2, 9.9, 10.4, 10.1, 10.3 |
Not used |
10 |
Compare sample mean with target |
Formula Used
One sample: t = (x̄ - μ0) / (s / √n), with df = n - 1.
Paired sample: t = (d̄ - μ0) / (sd / √n), with df = n - 1.
Pooled two sample: t = (x̄1 - x̄2 - μ0) / √[sp²(1/n1 + 1/n2)].
Pooled variance: sp² = [(n1 - 1)s1² + (n2 - 1)s2²] / (n1 + n2 - 2).
Welch test: t = (x̄1 - x̄2 - μ0) / √(s1²/n1 + s2²/n2).
Welch df: df = (s1²/n1 + s2²/n2)² / [(s1²/n1)²/(n1 - 1) + (s2²/n2)²/(n2 - 1)].
Confidence interval: estimate ± t critical × standard error.
Effect size: Cohen's d = difference / standard deviation. Hedges g applies a small sample correction.
How to Use This Calculator
Select the test type first. Choose raw data if you have each observation. Choose summary statistics if you only know n, mean, and standard deviation. Enter the null mean or null difference. Select the alternative hypothesis and confidence level. Press the submit button to show the result above the form. Use the CSV or PDF button to save the output.
Student t testing explained
A Student t test helps compare means when population variation is unknown. It uses sample standard deviation, sample size, and an assumed null value. The method works well for small samples, when observations are independent and measurements are roughly continuous. It is also useful when data are close to normal, or when sample sizes are large enough for stable mean estimates.
Main test choices
A one sample test compares one sample mean with a target value. A paired test compares matched observations, such as before and after scores. An independent pooled test compares two groups when equal variance is reasonable. Welch's test compares two groups without assuming equal variance. Welch's method is often safer when spreads or sample sizes differ.
Interpreting results
The t statistic measures how far the observed mean difference is from the null value, using standard error units. A larger absolute t value gives stronger evidence against the null hypothesis. The p value converts that distance into probability under the null model. A small p value means the observed result would be unusual if the null claim were true.
Confidence intervals
A confidence interval shows a practical range for the estimated mean or mean difference. If a two sided interval excludes the null value, the test usually rejects at the matching alpha level. Intervals are helpful because they show direction, size, and uncertainty together.
Effect size
Effect size adds practical meaning. Cohen's d expresses the difference in standard deviation units. Hedges g adjusts d for smaller samples. A statistically significant result can still be small in practical terms. A non significant result can still matter when the sample is too small.
Good practice
Check the study design before trusting a test. Use paired analysis only for matched data. Use Welch analysis when group variation is unequal. Inspect raw values for entry mistakes and extreme outliers. Report the test type, t value, degrees of freedom, p value, interval, and effect size. These details make the conclusion clearer and easier to review.
Limits matter too
The calculator supports decisions, but it does not replace design knowledge. Always consider sampling bias, measurement quality, missing values, and whether the chosen alternative hypothesis was planned before analysis started.
FAQs
What is a Student's t test?
It is a method for testing whether a sample mean or mean difference is statistically different from a chosen null value.
When should I use Welch's test?
Use Welch's test when comparing two independent groups and equal variance is uncertain. It handles unequal spreads and unequal sample sizes better.
When is a paired t test correct?
Use a paired test when each value in one sample is directly matched with one value in the other sample.
What does the p value mean?
The p value shows how unusual the observed statistic would be if the null hypothesis were true.
What does degrees of freedom mean?
Degrees of freedom describe how much independent information supports the estimate of variation used in the test.
What is Cohen's d?
Cohen's d expresses the mean difference in standard deviation units, helping judge practical size beyond statistical significance.
Can I use summary statistics?
Yes. Enter sample size, mean, and standard deviation. For paired summary data, enter the summary of paired differences.
Why does the result show a confidence interval?
The interval gives a likely range for the mean or mean difference and shows uncertainty around the estimate.