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]

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

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

Problem: A government office claims average processing time for applications is 25 days. A consumer 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.

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.

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.

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?

Problem 5

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


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 < α

Next Topic

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