~/ learn/ afm-113/ cards/ Minimum sample size for a mean
1 of 7

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

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/eb7d59f4-0c1b-4a1d-8e27-284c37a0fde1/flashcard utf-8 LF