One-Sample t-Statistic Calculator
Calculate the one-sample t-statistic from sample mean, hypothesized population mean, standard deviation, and sample size. Use this to test whether your sample mean differs significantly from a known or assumed value.
How to use this tool
- Enter sample mean, hypothesized mean (mu0), standard deviation and sample size (n) in the fields above.
- Results update instantly as you type โ or click Calculate.
- Read your t-statistic and the full breakdown beneath it.
Formula
t = (x_bar - mu0) / (SD / sqrt(n))
How it works
Subtract the hypothesized mean from the sample mean, then divide by the standard error (SD divided by the square root of n). Degrees of freedom = n - 1.
Worked example
IQ intervention study
- Sample mean = 105, mu0 = 100, SD = 15, n = 36
- SE = 15 / sqrt(36) = 2.5
- t = (105 - 100) / 2.5 = 2.0
- With df = 35, p < 0.05 (two-tailed critical t ~2.03); borderline significant.
Common mistakes to avoid
- Using the population standard deviation sigma instead of the sample standard deviation SD in the denominator โ the one-sample t-test requires SD estimated from the sample, not a known population parameter.
- Forgetting to divide SD by sqrt(n) to form the standard error โ computing (x_bar - mu0) / SD (without sqrt(n)) ignores sample size and gives an incorrect result.
- Confusing the t-statistic with the p-value โ a large |t| means more evidence against the null hypothesis, but you still need to compare it to a t-distribution with n-1 degrees of freedom to get a p-value.
Key terms
Frequently asked questions
- How do I interpret the t-statistic?
- A t-statistic near 0 means your sample mean is close to the hypothesised value mu0. As |t| grows, the sample mean is further from mu0 relative to sampling variability. Compare t to the critical value from a t-table with n-1 degrees of freedom at your chosen significance level.
- What are the degrees of freedom for this test?
- For a one-sample t-test, df = n - 1. You use this to look up the critical t-value or compute the p-value. Larger samples have more df and the t-distribution approaches the standard normal.
- When should I use a one-sample t-test versus a z-test?
- Use a t-test when the population standard deviation is unknown and you estimate it from the sample (the usual case). Use a z-test only when the population standard deviation is known exactly and n is large.