What Is Z Test Statistic?
A z test statistic measures how many standard errors an observed value lies from its expected value under the null hypothesis. The general pattern is z = (observed − expected) ÷ standard error, and only the standard error changes between the four cases covered here.
The calculator gives all three p-values so you can choose the one that matches your alternative hypothesis, plus the percentile of the z-score and whether |z| ≥ 1.96, the usual two-tailed cut-off at the 5 % level. For a full test with a decision and confidence interval, use the z-test calculator.
Below you will find the formulas, a variables table, a worked example and answers to common questions such as how to compute z for a proportion and how to choose the tail.
How to Use the Z Test Statistic Calculator
- Choose what you are standardising.
- Fill in the matching inputs.
- Read z and the p-value that matches your alternative hypothesis (two-tailed, right or left).
- Compare |z| with the critical value, for example 1.96 at α = 0.05 (two-tailed).
Z Test Statistic Formula
z-score of one value
z for a sample mean
z for a proportion
z for two proportions
Z Test Statistic Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| z | Test statistic | (observed − expected) ÷ SE |
| x̄, μ₀, σ, n | Inputs for a mean | z = (x̄ − μ₀) ÷ (σ/√n) |
| p̂, p₀ | Sample and hypothesised proportion | For a proportion |
| SE | Standard error | Depends on the case |
Z Test Statistic Worked Example
Using the example values (press “Load example” above to try them):
- z = (x̄ − μ₀) ÷ (σ/√n) = (52.3 − 50) ÷ 1.33333 = 1.725.
- Left-tail area Φ(z) = 0.957736; right-tail = 0.0422637.
- Two-tailed p-value = 2 × min(left, right) = 0.0845275.
Result: z for a sample mean = 1.725; Two-tailed p-value = 0.084527.
Reading the z value
| |z| | Two-tailed p-value | Reading |
|---|---|---|
| 0 to 1 | above 0.32 | Very ordinary |
| 1.645 | 0.10 | Significant at 10% |
| 1.96 | 0.05 | Significant at 5% |
| 2.576 | 0.01 | Significant at 1% |
| 3.291 | 0.001 | Significant at 0.1% |
| Above 4 | below 0.0001 | Extremely unusual under H₀ |
z or t?
Use a z statistic when the population standard deviation is known, or when you test a proportion (where the variance is determined by p₀). If σ is unknown and you estimate it from the sample, use a t statistic, which is wider in the tails for small samples. With n above 30 the two give almost identical answers.
Conditions
- Random sample with independent observations.
- For means: the population is roughly normal or n is large (about 30 or more).
- For proportions: expected successes and failures at least 10 under H₀.
- For two proportions: both groups have at least 10 successes and failures.
Where Z Test Statistic Is Used
Standardising a value
Finding how far one observation is from the mean in SD units.
Testing a mean or proportion
Computing the statistic and the matching p-values.
Comparing two proportions
Getting z for the difference between two rates.
Coursework
Checking z calculations and tail choices.
Common Z Test Statistic Mistakes to Avoid
- The sign of z shows direction; the size shows strength.
- For a left-tailed test use the left-tail p-value, for right-tailed the right-tail value.
- A z-score for a single value is a standardised distance, not a test of a hypothesis.
Z Test Statistic Terms and Definitions
- z-score
- The number of standard deviations a value lies from the mean.
- Standard error
- The standard deviation of a statistic such as the sample mean.
Z Test Statistic FAQs
What is a z test statistic?
A standardised value that tells you how many standard errors a sample estimate is from the hypothesised value.
How do I calculate the z test statistic for a mean?
Subtract the hypothesised mean from the sample mean and divide by σ/√n.
What is the critical z for 95% confidence?
1.96 for a two-tailed test. For a one-tailed 5% test it is 1.645.
How do I get a p-value from z?
Use the standard normal distribution: left tail Φ(z), right tail 1 − Φ(z), two-tailed twice the smaller tail.
What is the difference between z-score and z-statistic?
A z-score standardises a single observation. A z-statistic standardises a sample statistic such as a mean, using its standard error.
Can z be negative?
Yes. A negative z means the observed value is below the hypothesised value.