T-Statistic Calculator Formula
Understand the math behind the t-statistic calculator. Each variable explained with a worked example.
Formulas Used
T-Statistic
t_stat = (x_bar - mu) / seStandard Error
standard_error = seDegrees of Freedom
df = n - 1|t|
abs_t = abs((x_bar - mu) / se)Variables
| Variable | Description | Default |
|---|---|---|
x_bar | Sample Mean | 52 |
mu | Hypothesized Mean (mu) | 50 |
s | Sample Standard Deviation | 5 |
n | Sample Size | 25 |
se | Derived value= s / sqrt(n) | calculated |
How It Works
How to Calculate the T-Statistic
Formula
t = (x_bar - mu) / (s / sqrt(n))
The t-statistic measures how many standard errors the sample mean is from the hypothesized population mean. It follows a t-distribution with n-1 degrees of freedom. Use the t-test instead of the z-test when the population standard deviation is unknown and estimated by the sample SD.
Worked Example
Sample mean = 52, hypothesized mean = 50, sample SD = 5, n = 25.
x_bar = 52mu = 50s = 5n = 25
- 01SE = 5 / sqrt(25) = 5 / 5 = 1
- 02t = (52 - 50) / 1 = 2
- 03df = 25 - 1 = 24
- 04Compare t = 2 to the t-distribution with 24 df
- 05Critical value at alpha=0.05 (two-tailed): approximately 2.064
- 06Since |t| = 2 < 2.064, the result is not quite significant at 5% (two-tailed).
Ready to run the numbers?
Open T-Statistic Calculator