Overview
A one-sample z-test checks whether a sample mean differs from a hypothesized value when the population standard deviation is known.
Enter the sample mean, the hypothesized mean, the population standard deviation and the sample size.
Worked examples
| Inputs | Result |
|---|---|
| Sample Mean54.2Hypothesized Population Mean50Population Standard Deviation12Sample Size (n)64 | Z statistic: 2.8Two-tailed p-value: 0.00511Reject H0 at 5% level |
Show 2 more examples
| Sample Mean101Hypothesized Population Mean100Population Standard Deviation15Sample Size (n)100 | Z statistic: 0.67Two-tailed p-value: 0.5Fail to reject H0 at 5% level |
| Sample Mean505Hypothesized Population Mean500Population Standard Deviation20Sample Size (n)30 | Z statistic: 1.37Two-tailed p-value: 0.17Fail to reject H0 at 5% level |
Z statistic by sample mean
With the calculator's starting values, the z statistic is 2.8. The table shows how it changes with the sample mean.
| Sample Mean | Z statistic |
|---|---|
| 30 | -13.33 |
| 40 | -6.67 |
| 50 | 0 |
| 54.2starting value | 2.8 |
| 60 | 6.67 |
| 70 | 13.33 |
| 80 | 20 |
Other inputs: Hypothesized Population Mean: 50 · Population Standard Deviation: 12 · Sample Size: 64 n. Change them in the calculator above for your own numbers.
How it works
z is the difference in means divided by σ ÷ √n. The two-tailed p-value comes from the normal curve. The decision uses a 5% level. If σ is estimated from the sample, a t-test is the better choice.
The formula
Practical tips
- A mean of 54.2 against 50, with σ = 12 and n = 64, gives z = 2.8 and p ≈ 0.005.
- |z| above 1.96 is significant at 5% two-tailed.
- Known σ is rare outside standardized tests and established manufacturing processes.
Frequently asked questions
z-test or t-test?
Use z when σ is known, or for very large samples. Otherwise use t.
What does p ≈ 0.01 mean?
A result this far from 50 would happen about 1% of the time if the true mean were 50.
Can it be one-tailed?
Halve the two-tailed p if you specified the direction in advance.