t-statistic Calculator
Enter sample data and a null hypothesis mean to calculate the one-sample t-statistic, standard deviation, and degrees of freedom.
Sample size (n): 5
Sample mean (x̄): 18.0000
Sample standard deviation (s): 4.7434
Standard error (s / √n): 2.1213
t-statistic: 0.0000
Degrees of freedom: 4
How to Use This Calculator
- Input your sample observations as numeric values.
- Specify the population mean under the null hypothesis.
- Review the calculated t-statistic, standard deviation, and degrees of freedom.
- Use the t-statistic with t distribution tables or p-value calculators to assess significance.
Formula
x̄ = Σxi / n
s = √[Σ(xi − x̄)² / (n − 1)]
t = (x̄ − μ₀) / (s / √n)
Degrees of freedom = n − 1
Full Description
The one-sample t-statistic compares a sample mean to a hypothesized population mean when population standard deviation is unknown. It accounts for sample variability via the sample standard deviation.
Use the computed t-statistic with Student’s t distribution to determine p-values or critical values for hypothesis tests.
Frequently Asked Questions
Can I use this for variance zero?
No. A zero standard deviation indicates all values are identical, making the t-statistic undefined.
How do I get a p-value?
Use the t-statistic with a t-distribution p-value calculator or table using n − 1 degrees of freedom.
Is this the same as a z-test?
When population standard deviation is known, use the z-test. The t-test substitutes the sample standard deviation.
Does sample size matter?
Small samples result in heavier tails. The t distribution adjusts for this via degrees of freedom.