Compute the minimum n for σ = 8 at three settings — 95 % with m = 1.5, 90 % with m = 1.5, 95 % with m = 0.75 (z = 1.96 and 1.645) — rounding up, and print them on one line.
Compute the minimum n for σ = 8 at three settings — 95 % with m = 1.5, 90 % with m = 1.5, 95 % with m = 0.75 (z = 1.96 and 1.645) — rounding up, and print them on one line.
Answer
import math sigma = 8 settings = [("95%", 1.96, 1.5), ("90%", 1.645, 1.5), ("95%", 1.96, 0.75)] parts = [] for level, z, m in settings: n = math.ceil((z * sigma / m) ** 2) parts.append(f"n({level}, m={m})={n}") print(" ".join(parts))
IBS1 §8.4 (sample size for a mean), CC BY 4.0; H-W7 (why t is impossible; "what if 90 %?") — shape only; original dataset