For H₀: μ = 45 vs Hₐ: μ < 45 with x̄ = 43.1, σ = 8, n = 64 and α = 0.05 (critical −1.645), compute z and print the statistic, the critical value and the decision.
For H₀: μ = 45 vs Hₐ: μ < 45 with x̄ = 43.1, σ = 8, n = 64 and α = 0.05 (critical −1.645), compute z and print the statistic, the critical value and the decision.
Answer
import math xbar, mu0, sigma, n = 43.1, 45, 8, 64 se = sigma / math.sqrt(n) z = (xbar - mu0) / se critical = -1.645 decision = "reject H0" if z < critical else "do not reject H0" print(f"z={z:.2f} critical={critical} decision={decision}")
IBS1 §9.3–9.4 (the test statistic and decision), IS1 §9.5, CC BY 4.0; H-W9 (four-step layout) — shape only; original dataset