With σ₁ = 6, n₁ = 36, σ₂ = 8, n₂ = 64, compute the SE of X̄₁ − X̄₂ and the z statistic for an observed difference of 3.5 under H₀: μ₁ − μ₂ = 0.
With σ₁ = 6, n₁ = 36, σ₂ = 8, n₂ = 64, compute the SE of X̄₁ − X̄₂ and the z statistic for an observed difference of 3.5 under H₀: μ₁ − μ₂ = 0.
Answer
import math sigma1, n1, sigma2, n2 = 6, 36, 8, 64 se = math.sqrt(sigma1**2 / n1 + sigma2**2 / n2) diff = 3.5 z = diff / se print(f"SE={se:.4f} z={z:.2f}")
IBS1 §10.1 and §10.5 (the σ-known case), CC BY 4.0; H-W9 — shape only; original dataset