Unit 5: Solved Numerical Problems (Part 1)
Z-Tests and T-Tests
This section contains 20+ fully solved problems on hypothesis testing for means and proportions.
Section A: Large Sample Tests for Mean (Z-Test)
Problem 1: One-Sample Z-Test (Right-Tailed)
Question: A company claims its employees work an average of 40 hours per week. A sample of 64 employees shows a mean of 42 hours with a population standard deviation of 8 hours. Test at α = 0.05 whether employees work more than 40 hours per week.
Click to reveal solution
**Step 1: State the hypotheses** - $H_0: \mu = 40$ (employees work 40 hours) - $H_1: \mu > 40$ (employees work more than 40 hours) This is a **right-tailed test**. **Step 2: Identify the test and parameters** - Test: Z-test (σ known, n ≥ 30) - Given: n = 64, x̄ = 42, σ = 8, α = 0.05 **Step 3: Calculate the test statistic** $$Z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}} = \frac{42 - 40}{8/\sqrt{64}} = \frac{2}{8/8} = \frac{2}{1} = 2.00$$ **Step 4: Find the critical value** For right-tailed test at α = 0.05: Z\* = 1.645 **Step 5: Decision Rule** - If Z > Z\*, reject H₀ - 2.00 > 1.645 ✓ **Step 6: Conclusion** **Reject H₀** at α = 0.05. There is sufficient evidence to conclude that employees work more than 40 hours per week on average. **p-value approach:** p-value = P(Z > 2.00) = 1 - 0.9772 = 0.0228 Since p-value (0.0228) < α (0.05), reject H₀.Problem 2: One-Sample Z-Test (Left-Tailed)
Question: A government claims that average response time to citizen complaints is 5 days. A sample of 100 complaints shows mean response time of 4.5 days. The population SD is 2 days. Test at α = 0.01 whether the average response time is less than 5 days.
Click to reveal solution
**Step 1: State hypotheses** - $H_0: \mu = 5$ - $H_1: \mu < 5$ (left-tailed) **Step 2: Calculate test statistic** $$Z = \frac{4.5 - 5}{2/\sqrt{100}} = \frac{-0.5}{0.2} = -2.50$$ **Step 3: Critical value** For left-tailed test at α = 0.01: Z\* = -2.326 **Step 4: Decision** - Z = -2.50 < -2.326 - **Reject H₀** **Step 5: Conclusion** At α = 0.01, there is sufficient evidence to conclude that average response time is less than 5 days.Problem 3: One-Sample Z-Test (Two-Tailed)
Question: A manufacturer claims package weight is 500 grams. A sample of 49 packages has mean weight 495 grams. Population SD is 14 grams. Test at α = 0.05 whether the mean differs from 500 grams.
Click to reveal solution
**Step 1: State hypotheses** - $H_0: \mu = 500$ - $H_1: \mu \neq 500$ (two-tailed) **Step 2: Calculate test statistic** $$Z = \frac{495 - 500}{14/\sqrt{49}} = \frac{-5}{2} = -2.50$$ **Step 3: Critical values** For two-tailed test at α = 0.05: Z\* = ±1.96 **Step 4: Decision** - |Z| = 2.50 > 1.96 - **Reject H₀** **Step 5: Conclusion** At α = 0.05, there is sufficient evidence that the mean weight differs from 500 grams. **95% Confidence Interval:** $$CI = 495 \pm 1.96 \times 2 = (491.08, 498.92)$$ Since 500 is not in this interval, we reject H₀.Problem 4: Two-Sample Z-Test (Independent Means)
Question: Compare productivity of two departments:
- Department A: n₁ = 50, x̄₁ = 85, σ₁ = 10
- Department B: n₂ = 60, x̄₂ = 80, σ₂ = 12
Test at α = 0.05 whether Department A has higher productivity.
Solution:
Step 1: State hypotheses
- $H_0: \mu_1 = \mu_2$ (or $\mu_1 - \mu_2 = 0$)
- $H_1: \mu_1 > \mu_2$ (right-tailed)
Step 2: Calculate pooled standard error \(SE = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} = \sqrt{\frac{100}{50} + \frac{144}{60}}\) \(= \sqrt{2 + 2.4} = \sqrt{4.4} = 2.098\)
Step 3: Calculate test statistic \(Z = \frac{(\bar{x}_1 - \bar{x}_2) - 0}{SE} = \frac{85 - 80}{2.098} = \frac{5}{2.098} = 2.38\)
Step 4: Critical value For right-tailed test at α = 0.05: Z* = 1.645
Step 5: Decision Z = 2.38 > 1.645, Reject H₀
Step 6: Conclusion At α = 0.05, Department A has significantly higher productivity than Department B.
Problem 5: Two-Sample Z-Test (Two-Tailed)
Question: Two teaching methods are compared:
- Method 1: n₁ = 40, x̄₁ = 72, σ₁ = 8
- Method 2: n₂ = 45, x̄₂ = 68, σ₂ = 10
Test at α = 0.01 whether the methods differ in effectiveness.
Solution:
Step 1: State hypotheses
- $H_0: \mu_1 = \mu_2$
- $H_1: \mu_1 \neq \mu_2$ (two-tailed)
Step 2: Calculate SE \(SE = \sqrt{\frac{64}{40} + \frac{100}{45}} = \sqrt{1.6 + 2.22} = \sqrt{3.82} = 1.955\)
Step 3: Calculate Z \(Z = \frac{72 - 68}{1.955} = \frac{4}{1.955} = 2.046\)
Step 4: Critical values For two-tailed test at α = 0.01: Z* = ±2.576
Step 5: Decision |Z| = 2.046 < 2.576, Fail to Reject H₀
Step 6: Conclusion At α = 0.01, there is insufficient evidence to conclude that the teaching methods differ in effectiveness.
Section B: Tests for Proportions
Problem 6: One-Sample Proportion Test
Question: A company claims 80% of customers are satisfied. A survey of 200 customers shows 148 are satisfied. Test at α = 0.05 whether the satisfaction rate is less than claimed.
Click to reveal solution
**Step 1: State hypotheses** - $H_0: p = 0.80$ - $H_1: p < 0.80$ (left-tailed) **Step 2: Calculate sample proportion** $$\hat{p} = \frac{148}{200} = 0.74$$ **Step 3: Calculate test statistic** $$Z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}} = \frac{0.74 - 0.80}{\sqrt{\frac{0.80 \times 0.20}{200}}}$$ $$= \frac{-0.06}{\sqrt{0.0008}} = \frac{-0.06}{0.0283} = -2.12$$ **Step 4: Critical value** Left-tailed at α = 0.05: Z\* = -1.645 **Step 5: Decision** Z = -2.12 < -1.645, **Reject H₀** **Step 6: Conclusion** At α = 0.05, there is sufficient evidence that satisfaction rate is less than 80%.Problem 7: Two-Sample Proportion Test
Question: Compare effectiveness of two training programs:
- Program A: 45 out of 100 trainees passed
- Program B: 62 out of 120 trainees passed
Test at α = 0.05 whether pass rates differ.
Solution:
Step 1: State hypotheses
- $H_0: p_1 = p_2$
- $H_1: p_1 \neq p_2$ (two-tailed)
Step 2: Calculate sample proportions \(\hat{p}_1 = \frac{45}{100} = 0.45, \quad \hat{p}_2 = \frac{62}{120} = 0.517\)
Step 3: Calculate pooled proportion \(\bar{p} = \frac{45 + 62}{100 + 120} = \frac{107}{220} = 0.486\)
Step 4: Calculate SE \(SE = \sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}\) \(= \sqrt{0.486 \times 0.514 \times \left(\frac{1}{100} + \frac{1}{120}\right)}\) \(= \sqrt{0.2498 \times 0.0183} = \sqrt{0.00457} = 0.0676\)
Step 5: Calculate Z \(Z = \frac{0.45 - 0.517}{0.0676} = \frac{-0.067}{0.0676} = -0.99\)
Step 6: Critical values Two-tailed at α = 0.05: Z* = ±1.96
Step 7: Decision |Z| = 0.99 < 1.96, Fail to Reject H₀
Step 8: Conclusion At α = 0.05, there is insufficient evidence that the pass rates differ between programs.
Section C: Small Sample Tests (t-Tests)
Problem 8: One-Sample t-Test
Question: A government office claims average processing time is 30 minutes. A sample of 20 cases shows mean time of 34 minutes with SD of 8 minutes. Test at α = 0.05 whether processing time exceeds 30 minutes.
Click to reveal solution
**Step 1: State hypotheses** - $H_0: \mu = 30$ - $H_1: \mu > 30$ (right-tailed) **Step 2: Calculate test statistic** $$t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} = \frac{34 - 30}{8/\sqrt{20}} = \frac{4}{1.789} = 2.236$$ **Step 3: Find critical value** df = 20 - 1 = 19, right-tailed, α = 0.05 t\* = 1.729 **Step 4: Decision** t = 2.236 > 1.729, **Reject H₀** **Step 5: Conclusion** At α = 0.05, there is sufficient evidence that average processing time exceeds 30 minutes.Problem 9: One-Sample t-Test (Two-Tailed)
Question: A standard specifies mean weight of 500g. A sample of 16 items has mean 492g and SD 20g. Test at α = 0.05 if the mean differs from standard.
Click to reveal solution
**Step 1: State hypotheses** - $H_0: \mu = 500$ - $H_1: \mu \neq 500$ (two-tailed) **Step 2: Calculate t** $$t = \frac{492 - 500}{20/\sqrt{16}} = \frac{-8}{5} = -1.60$$ **Step 3: Critical value** df = 15, two-tailed, α = 0.05 t\* = ±2.131 **Step 4: Decision** \|t\| = 1.60 < 2.131, **Fail to Reject H₀** **Step 5: Conclusion** At α = 0.05, there is insufficient evidence that the mean weight differs from 500g.Problem 10: Two-Sample Independent t-Test
Question: Compare productivity of two teams:
- Team A: n₁ = 12, x̄₁ = 85, s₁ = 8
- Team B: n₂ = 15, x̄₂ = 78, s₂ = 10
Test at α = 0.05 whether Team A is more productive.
Solution:
Step 1: State hypotheses
- $H_0: \mu_1 = \mu_2$
- $H_1: \mu_1 > \mu_2$ (right-tailed)
Step 2: Calculate pooled variance \(s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}\) \(= \frac{(11)(64) + (14)(100)}{25} = \frac{704 + 1400}{25} = \frac{2104}{25} = 84.16\)
\[s_p = \sqrt{84.16} = 9.17\]Step 3: Calculate SE \(SE = s_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}} = 9.17\sqrt{\frac{1}{12} + \frac{1}{15}}\) \(= 9.17\sqrt{0.0833 + 0.0667} = 9.17\sqrt{0.15} = 9.17 \times 0.387 = 3.55\)
Step 4: Calculate t \(t = \frac{85 - 78}{3.55} = \frac{7}{3.55} = 1.97\)
Step 5: Find critical value df = 12 + 15 - 2 = 25, right-tailed, α = 0.05 t* = 1.708
Step 6: Decision t = 1.97 > 1.708, Reject H₀
Step 7: Conclusion At α = 0.05, Team A has significantly higher productivity than Team B.
Problem 11: Two-Sample t-Test (Two-Tailed)
Question: Compare exam scores:
- Group 1: n₁ = 10, x̄₁ = 75, s₁ = 12
- Group 2: n₂ = 12, x̄₂ = 68, s₂ = 10
Test at α = 0.05 if means differ.
Solution:
Step 1: Hypotheses
- $H_0: \mu_1 = \mu_2$
- $H_1: \mu_1 \neq \mu_2$ (two-tailed)
Step 2: Pooled variance \(s_p^2 = \frac{9(144) + 11(100)}{20} = \frac{1296 + 1100}{20} = 119.8\) \(s_p = 10.95\)
Step 3: SE \(SE = 10.95\sqrt{\frac{1}{10} + \frac{1}{12}} = 10.95\sqrt{0.183} = 4.69\)
Step 4: t-statistic \(t = \frac{75 - 68}{4.69} = 1.49\)
Step 5: Critical value df = 20, two-tailed, α = 0.05 t* = ±2.086
Step 6: Decision |t| = 1.49 < 2.086, Fail to Reject H₀
Step 7: Conclusion At α = 0.05, there is insufficient evidence of a difference in mean scores.
Section D: Paired t-Test
Problem 12: Paired t-Test (Training Effect)
Question: A training program’s effectiveness is tested on 8 employees:
| Employee | Before | After |
|---|---|---|
| 1 | 65 | 72 |
| 2 | 70 | 78 |
| 3 | 55 | 62 |
| 4 | 80 | 85 |
| 5 | 68 | 76 |
| 6 | 72 | 80 |
| 7 | 58 | 68 |
| 8 | 75 | 82 |
Test at α = 0.05 if training improved performance.
Solution:
Step 1: Calculate differences (d = After - Before)
| Employee | Before | After | d | d² |
|---|---|---|---|---|
| 1 | 65 | 72 | 7 | 49 |
| 2 | 70 | 78 | 8 | 64 |
| 3 | 55 | 62 | 7 | 49 |
| 4 | 80 | 85 | 5 | 25 |
| 5 | 68 | 76 | 8 | 64 |
| 6 | 72 | 80 | 8 | 64 |
| 7 | 58 | 68 | 10 | 100 |
| 8 | 75 | 82 | 7 | 49 |
| Sum | 60 | 464 |
Step 2: Calculate statistics \(\bar{d} = \frac{60}{8} = 7.5\)
\(s_d = \sqrt{\frac{\sum d^2 - \frac{(\sum d)^2}{n}}{n-1}} = \sqrt{\frac{464 - \frac{3600}{8}}{7}}\) \(= \sqrt{\frac{464 - 450}{7}} = \sqrt{2} = 1.414\)
Step 3: State hypotheses
- $H_0: \mu_d = 0$ (no improvement)
- $H_1: \mu_d > 0$ (improvement)
Step 4: Calculate t \(t = \frac{\bar{d} - 0}{s_d/\sqrt{n}} = \frac{7.5}{1.414/\sqrt{8}} = \frac{7.5}{0.5} = 15.0\)
Step 5: Critical value df = 7, right-tailed, α = 0.05 t* = 1.895
Step 6: Decision t = 15.0 > 1.895, Reject H₀
Step 7: Conclusion At α = 0.05, the training program significantly improved employee performance.
Problem 13: Paired t-Test (Two-Tailed)
Question: Blood pressure readings before and after medication for 6 patients:
| Patient | Before | After |
|---|---|---|
| 1 | 140 | 135 |
| 2 | 155 | 145 |
| 3 | 130 | 132 |
| 4 | 148 | 140 |
| 5 | 160 | 150 |
| 6 | 145 | 138 |
Test at α = 0.05 if there’s a significant change.
Solution:
Step 1: Calculate differences (d = Before - After)
| Patient | d | d² |
|---|---|---|
| 1 | 5 | 25 |
| 2 | 10 | 100 |
| 3 | -2 | 4 |
| 4 | 8 | 64 |
| 5 | 10 | 100 |
| 6 | 7 | 49 |
| Sum | 38 | 342 |
Step 2: Calculate statistics \(\bar{d} = \frac{38}{6} = 6.33\)
\[s_d = \sqrt{\frac{342 - \frac{1444}{6}}{5}} = \sqrt{\frac{342 - 240.67}{5}} = \sqrt{20.27} = 4.50\]Step 3: Calculate t \(t = \frac{6.33}{4.50/\sqrt{6}} = \frac{6.33}{1.84} = 3.44\)
Step 4: Critical value df = 5, two-tailed, α = 0.05 t* = ±2.571
Step 5: Decision |t| = 3.44 > 2.571, Reject H₀
Step 6: Conclusion At α = 0.05, there is a significant change in blood pressure after medication.
Summary Table: Choosing the Right Test
| Scenario | Test | Statistic |
|---|---|---|
| One mean, σ known or n ≥ 30 | Z-test | $Z = \frac{\bar{x}-\mu}{\sigma/\sqrt{n}}$ |
| One mean, σ unknown, n < 30 | t-test | $t = \frac{\bar{x}-\mu}{s/\sqrt{n}}$ |
| Two means, large samples | Z-test | $Z = \frac{\bar{x}_1-\bar{x}_2}{SE}$ |
| Two means, small samples | t-test | $t = \frac{\bar{x}_1-\bar{x}_2}{s_p\sqrt{1/n_1+1/n_2}}$ |
| Paired samples | Paired t | $t = \frac{\bar{d}}{s_d/\sqrt{n}}$ |
| One proportion | Z-test | $Z = \frac{\hat{p}-p}{\sqrt{p(1-p)/n}}$ |
| Two proportions | Z-test | $Z = \frac{\hat{p}_1-\hat{p}_2}{SE}$ |
Practice Problems
-
A sample of 81 has mean 125 and σ = 18. Test H₀: μ = 120 vs H₁: μ > 120 at α = 0.05.
-
Two groups: n₁ = 36, x̄₁ = 82, σ₁ = 6; n₂ = 49, x̄₂ = 78, σ₂ = 7. Test if means differ at α = 0.01.
-
A sample of 16 has mean 50 and s = 8. Test H₀: μ = 55 vs H₁: μ < 55 at α = 0.05.
-
In a sample of 400, 180 prefer A. Test if preference differs from 50% at α = 0.05.
-
Before-after data for 10 subjects shows d̄ = 5, s_d = 3. Test if mean changed at α = 0.01.


