Statistics & Probability
Advanced

Z-Test Statistic

Tests whether a sample mean differs from a hypothesized value.

Formula

z=xˉ−μ0σ/nz = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}

Variables

\bar{x}Sample mean
\mu_0Hypothesized mean

Example

Compare to critical z

How it works

The z-test statistic measures how far a sample mean is from a hypothesized population mean, but it scales that difference by the standard error so the result is in standard-deviation units. This works because, when the population standard deviation is known and the sampling conditions are appropriate, the sampling distribution of the mean is approximately normal with spread σ/n\sigma/\sqrt{n}. A large positive or negative z-value means the observed mean would be unlikely if the hypothesized mean were true.

When to use it

Use this when testing a claim about a population mean and the population standard deviation is known, or when the sample size is large enough for a normal approximation to be reliable. Common settings include quality control, manufacturing measurements, standardized test scores, and other measurement-based problems.

Worked example, step by step

A factory claims the fill volume of a drink is 500 mL. A quality inspector knows the population standard deviation is 12 mL and takes a sample of 36 bottles with mean fill volume 495 mL.

Step 1: Identify the values: xˉ=495\bar{x} = 495, μ0=500\mu_0 = 500, σ=12\sigma = 12, n=36n = 36.

Step 2: Compute the standard error: σ/n=12/36=12/6=2\sigma/\sqrt{n} = 12/\sqrt{36} = 12/6 = 2.

Step 3: Plug into the formula: z=(xˉ−μ0)/(σ/n)=(495−500)/2=−5/2z = (\bar{x} - \mu_0)/(\sigma/\sqrt{n}) = (495 - 500)/2 = -5/2.

Step 4: Simplify: z=−2.5z = -2.5.

Final answer: The sample mean is 2.5 standard errors below the hypothesized mean, so the z-test statistic is −2.5-2.5.

Common mistakes to avoid

  • Using the sample standard deviation \(s\) in place of the known population standard deviation \(\sigma\) without switching to a t-test
  • Forgetting to divide by \(\sqrt{n}\), which makes the denominator too large and the z-value too small in magnitude
  • Reversing the subtraction order and reporting \((\mu_0 - \bar{x})/(\sigma/\sqrt{n})\) without noticing the sign change

Did You Know?

The z-test assumes a known population standard deviation, a luxury so rare that the t-test usually replaces it.

Share this formula

Educational examples use simplified assumptions. Check units and applicability before using a result; health, financial and safety decisions need appropriate professional guidance. About FormulaWon · Report a correction