🧪 Z-Test

Last Updated: Jan 2026


A Z-Test is a hypothesis test used to determine whether a sample mean is significantly different from a population mean when the population variance is known and the sample size is large.

🗣 Hinglish Tip: Z-Test = jab sample bada ho aur population ka σ pata ho, tab mean compare karte hain

When to Use Z-Test?

Use Z-Test when all conditions are satisfied:

  • Sample size: n ≥ 30
  • Population standard deviation σ is known
  • Data is normally distributed or CLT applies
  • Random & independent samples

Types of Z-Test

  1. One-Sample Z-Test → Compare sample mean with population mean
  2. Two-Sample Z-Test → Compare means of two large samples
  3. Z-Test for Proportion → Compare proportions

👉 In this tutorial, we cover One-Sample Z-Test (most common)


Z-Test Notation (Math Standard)

  • Population mean → μ
  • Sample mean →
  • Population standard deviation → σ
  • Sample size → n
  • Significance level → α
  • Z statistic → Z

Z-Test Formula

Z = (x̄ − μ) / (σ / √n)

Decision Rule (Z-Table Method)

For α = 0.05:

Test TypeCritical Z-value
Two-tailed±1.96
Right-tailed+1.645
Left-tailed−1.645

Example

A company claims that the average battery life is 100 hours. A sample of 50 batteries is tested and the following is observed:

  • Sample mean: x̄ = 98
  • Population standard deviation: σ = 5
  • Significance level: α = 0.05

Test whether the company’s claim is correct.


Step 1: State the Hypotheses

Since we are checking difference, this is a two-tailed test.

H₀: μ = 100
H₁: μ ≠ 100

Step 2: Identify Test Type

  • n = 50 ≥ 30 ✅
  • σ known ✅

👉 Use Z-Test


Step 3: Compute Standard Error

σ / √n = 5 / √50
       = 5 / 7.07
       ≈ 0.707

Step 4: Calculate Z-Statistic

Z = (98 − 100) / 0.707
Z = −2 / 0.707
Z ≈ −2.83

Step 5: Find Critical Value

From Z-table (α = 0.05, two-tailed):

Critical Z = ±1.96

Step 6: Decision

ValueResult
Calculated Z−2.83
Critical Z±1.96

Since:

|Z| = 2.83 > 1.96

👉 Reject H₀


Step 7: Conclusion

There is sufficient evidence to conclude that the average battery life is NOT equal to 100 hours.

🗣 Hinglish Tip: Z value limit cross kar gaya → claim reject