How to use this calculator
Enter the sample mean, standard deviation and size, the mean claimed by the null hypothesis μ₀, the direction of the alternative and the significance level α. Use the t-test when the standard deviation comes from the sample (the usual case) and the z-test only when the population σ is known.
Formulas
Worked example
25 samples average 52 with s = 5. Is the mean different from 50 at α = 0.05? (the default)
- SE = 5/√25 = 1, so t = (52 − 50)/1 = 2.00 with 24 degrees of freedom.
- Two-tailed p = 2 P(T > 2.00) = 0.0569; the critical value is t0.025, 24 = 2.064.
- p > 0.05 (and 2.00 < 2.064), so fail to reject H0: not enough evidence that the mean differs from 50.
Frequently asked questions
Does “fail to reject” mean the null hypothesis is true?
No. It means the data are not strong enough to rule it out. A bigger sample might detect a difference this one could not.
One-tailed or two-tailed?
Use one tail only when the question asks about one direction before looking at the data (“is the mean greater than…”). Otherwise use two tails; a one-tailed p-value is half the two-tailed one.