Learning Objectives

By the end of this chapter, you will be able to:

  • Identify when to use the z-test for a single mean
  • Calculate the z-test statistic
  • Perform complete hypothesis tests for population mean
  • Interpret results in practical context

When to Use Z-Test for Single Mean

Use z-test when:

  1. Testing a claim about a single population mean (μ)
  2. σ is known OR n ≥ 30 (large sample)
  3. Sample is random from the population
flowchart TD
    A["Testing single mean μ?"]
    A --> B{"Is σ known?"}
    B -->|Yes| C["Use Z-test"]
    B -->|No| D{"Is n ≥ 30?"}
    D -->|Yes| E["Use Z-test<br/>with s instead of σ"]
    D -->|No| F["Use t-test"]

Why this matters in public administration

Ministries and municipalities routinely announce average figures: mean days to issue a citizenship certificate, mean stipend paid to trainees, mean household income in a ward. Citizens, media, and auditors often ask whether a sample still supports that claim. The large-sample z-test for a single mean is the standard tool when you have enough observations (or known σ) to treat the sampling distribution of $\bar{x}$ as approximately normal.

A useful mental picture: the claim sets a target $\mu_0$. Your sample mean $\bar{x}$ will almost never hit that target exactly. The question is whether the gap is larger than what random sampling noise would usually produce. That noise is measured by the standard error $\sigma/\sqrt{n}$ (or $s/\sqrt{n}$).


Test Statistic Formula

\[z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}\]

When σ is unknown but n ≥ 30:

\[z = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}\]

Where:

  • $\bar{x}$ = sample mean
  • $\mu_0$ = hypothesized population mean
  • $\sigma$ or $s$ = standard deviation
  • $n$ = sample size

Intuition: measuring distance in “standard errors”

The numerator is the raw gap between what you observed and what was claimed. The denominator converts that gap into standard-error units—how many SEs away from $\mu_0$ your sample mean sits.

  • If $ z $ is small (near 0), the sample mean is consistent with chance variation around $\mu_0$.
  • If $ z $ is large, the sample is unusually far from the claim—evidence against $H_0$.
Larger $n$ shrinks the SE, so the same raw gap (for example, 2 days) becomes a larger $ z $ and is more likely to be statistically significant. That is why a tiny difference can “look significant” in a very large survey—and why you should still ask whether the difference matters for policy (practical significance).

Step-by-Step Example 1: Two-Tailed Test

Problem: A District Administration Office claims the average processing time for recommendations is 25 days. A citizen group believes the time has changed. A random sample of 100 applications shows a mean of 27 days. Historical data shows σ = 10 days. Test at α = 0.05.

Solution:

Step 1: State hypotheses

  • $H_0: \mu = 25$ (Processing time is 25 days)
  • $H_1: \mu \neq 25$ (Processing time has changed)

Step 2: Significance level

  • α = 0.05 (two-tailed)

Step 3: Calculate test statistic \(z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}} = \frac{27 - 25}{10/\sqrt{100}} = \frac{2}{1} = 2.00\)

Step 4: Find critical values

  • Two-tailed, α = 0.05: z* = ±1.96

Step 5: Decision

  • |z| = 2.00 > 1.96
  • z falls in rejection region
  • Reject H₀

Step 6: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that the average processing time has changed from 25 days. The sample suggests it has increased.


Step-by-Step Example 2: Right-Tailed Test

Problem: A training program claims to increase employee productivity above the current average of 80 units per day. After training, a sample of 64 employees produced a mean of 84 units with s = 16. Test at α = 0.05 whether productivity has increased.

Solution:

Step 1: State hypotheses

  • $H_0: \mu = 80$
  • $H_1: \mu > 80$ (right-tailed, testing for increase)

Step 2: Significance level

  • α = 0.05 (right-tailed)

Step 3: Calculate test statistic Since n = 64 ≥ 30, use z with s: \(z = \frac{84 - 80}{16/\sqrt{64}} = \frac{4}{2} = 2.00\)

Step 4: Find critical value

  • Right-tailed, α = 0.05: z* = 1.645

Step 5: Decision

  • z = 2.00 > 1.645
  • Reject H₀

Step 6: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that the training program has increased average productivity above 80 units per day.


Step-by-Step Example 3: Left-Tailed Test

Problem: A hospital aims to reduce average patient wait time below 30 minutes. A sample of 49 patients shows mean wait of 27 minutes with s = 14 minutes. Test at α = 0.01.

Solution:

Step 1: State hypotheses

  • $H_0: \mu = 30$
  • $H_1: \mu < 30$ (left-tailed, testing for decrease)

Step 2: Significance level

  • α = 0.01 (left-tailed)

Step 3: Calculate test statistic \(z = \frac{27 - 30}{14/\sqrt{49}} = \frac{-3}{2} = -1.50\)

Step 4: Find critical value

  • Left-tailed, α = 0.01: z* = -2.33

Step 5: Decision

  • z = -1.50 > -2.33 (not in rejection region)
  • Fail to Reject H₀

Step 6: Conclusion At the 0.01 level of significance, there is insufficient evidence to conclude that average wait time has decreased below 30 minutes.


Using p-Value Approach

Example 4: p-Value Method

Using Example 2 data: z = 2.00, right-tailed test

Calculate p-value: \(p\text{-value} = P(Z > 2.00) = 1 - P(Z < 2.00) = 1 - 0.9772 = 0.0228\)

Decision: p-value = 0.0228 < α = 0.05 → Reject H₀

Interpretation: There is a 2.28% probability of observing a sample mean as extreme as 84 (or more) if the true mean were 80. This is unlikely enough to reject H₀.


Step-by-Step Example 5: Complete Exam Problem

Problem: The national average income is claimed to be NPR 35,000. A survey of 81 households in a district shows:

  • Sample mean: NPR 36,500
  • Sample standard deviation: NPR 9,000

Test at the 5% level whether the district’s average income differs from the national average. Also find the p-value.

Solution:

Step 1: State hypotheses

  • $H_0: \mu = 35,000$
  • $H_1: \mu \neq 35,000$ (two-tailed)

Step 2: Significance level

  • α = 0.05

Step 3: Calculate test statistic \(z = \frac{36,500 - 35,000}{9,000/\sqrt{81}} = \frac{1,500}{1,000} = 1.50\)

Step 4: Find critical values and p-value

Critical values: z* = ±1.96

p-value (two-tailed): \(p = 2 \times P(Z > 1.50) = 2 \times (1 - 0.9332) = 2 \times 0.0668 = 0.1336\)

Step 5: Decision

  • |z| = 1.50 < 1.96, OR
  • p-value = 0.1336 > α = 0.05
  • Fail to Reject H₀

Step 6: Conclusion At the 0.05 level of significance, there is insufficient evidence to conclude that the district’s average income differs from the national average of NPR 35,000.

The p-value of 0.1336 indicates there is a 13.36% chance of observing such a sample mean if the true mean equals 35,000 - not unusual enough to reject H₀.


Summary Table: Z-Test for Single Mean

Component Formula/Value
Test Statistic $z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}$
Critical Values (α=0.05) Two-tailed: ±1.96, One-tailed: ±1.645
Reject H₀ if |z| > z* (two-tailed), z > z* (right), z < -z* (left)
p-value Probability beyond observed z

Decision Summary

Test Type Reject H₀ When
Two-tailed (≠) |z| > 1.96 (at α=0.05)
Right-tailed (>) z > 1.645 (at α=0.05)
Left-tailed (<) z < -1.645 (at α=0.05)

Practice Problems

Problem 1

A manufacturer claims mean weight of packages is 500g. A sample of 100 packages shows mean 495g with σ = 25g. Test at α = 0.05 whether the mean differs from 500g.

Answer / solution sketch $H_0{:}\ \mu=500$, $H_1{:}\ \mu\neq 500$ (two-tailed). $$z=\frac{495-500}{25/\sqrt{100}}=-2.00$$ Critical values ±1.96. Since $|z|=2.00>1.96$ (p ≈ 0.046), **reject $H_0$**. Mean differs from 500g.

Problem 2

Average response time is claimed to be under 10 seconds. Sample: n = 36, $\bar{x}$ = 9.2 seconds, s = 3 seconds. Test at α = 0.01.

Answer / solution sketch $H_0{:}\ \mu=10$, $H_1{:}\ \mu<10$ (left-tailed). Use $s$ for $\sigma$. $$z=\frac{9.2-10}{3/\sqrt{36}}=-1.60$$ Critical value $z^*=-2.33$. Since $-1.60>-2.33$, **fail to reject $H_0$**. Insufficient evidence that mean response is under 10 seconds at α = 0.01.

Problem 3

Test if average expenditure exceeds NPR 50,000 given:

  • n = 64, $\bar{x}$ = 52,000, s = 8,000
  • α = 0.05 Calculate the p-value.
Answer / solution sketch $H_0{:}\ \mu=50000$, $H_1{:}\ \mu>50000$. $$z=\frac{52000-50000}{8000/\sqrt{64}}=2.00$$ p-value $= P(Z>2.00)\approx 0.0228$. Since $0.0228<0.05$, **reject $H_0$**. Expenditure exceeds NPR 50,000.

Problem 4

For z = -2.3 in a left-tailed test: (a) What is the p-value? (b) What is the decision at α = 0.05? (c) What is the decision at α = 0.01?

Answer / solution sketch (a) p-value $= P(Z\le -2.3)\approx 0.0107$ (b) $0.0107<0.05$ → **reject $H_0$** (c) $0.0107>0.01$ → **fail to reject $H_0$**

Problem 5

A sample of 100 gives $\bar{x}$ = 150, σ = 20. Test if μ = 145 at α = 0.01 (two-tailed).

Answer / solution sketch $H_0{:}\ \mu=145$, $H_1{:}\ \mu\neq 145$. $$z=\frac{150-145}{20/\sqrt{100}}=2.50$$ Critical values ±2.576. Since $|z|=2.50<2.576$, **fail to reject $H_0$** at α = 0.01.

Common Mistakes

  1. Choosing the wrong tail from the wording. “Has changed,” “differs from,” or “is different” → two-tailed. “Exceeds,” “is higher,” “has increased” → right-tailed. “Is less than,” “has decreased” → left-tailed. Match $H_1$ to the research claim, not to hope.
  2. Using σ when only s is available (or the reverse). If σ is truly known from a long historical series, use it. If you only have the sample SD and n ≥ 30, substitute s—but say so. If n < 30 and σ unknown, this is a t-test, not a z-test.
  3. Saying “accept H₀.” Prefer “fail to reject H₀” or “insufficient evidence against the claim.” Absence of evidence is not proof the claim is true.
  4. Confusing statistical and practical significance. A significant z may reflect a 0.5-day difference that does not justify a policy change. Always report the estimated mean (or CI) alongside the test decision.

Summary

The z-test for a single mean is used when:

  • Testing claims about population mean
  • σ is known or n ≥ 30
  • Data is from a random sample

Key Formula: \(z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}\)

Decision Rule:

  • Reject H₀ if test statistic falls in critical region
  • Or if p-value < α

In PA practice: use the test to check whether sample evidence still supports a published average (service time, stipend, income), then interpret the size of the difference for decision-makers.


Next Topic

In the next chapter, we will study Large Sample Test for Two Means - comparing means from two independent populations.