~/ learn/ afm-113/ cards/ Inverse problems: percentiles and critical values
1 of 7

Invert Φ by bisection to produce the z for 0.90, 0.95, 0.975 and 0.995, then the 90th percentile of N(120, 15²) using the two-decimal table z.

Invert Φ by bisection to produce the z for 0.90, 0.95, 0.975 and 0.995, then the 90th percentile of N(120, 15²) using the two-decimal table z.

Answer

import math def phi(z): return 0.5 * (1 + math.erf(z / math.sqrt(2))) def z_for(p): lo, hi = -6.0, 6.0 for _ in range(60): mid = (lo + hi) / 2 if phi(mid) < p: lo = mid else: hi = mid return (lo + hi) / 2 parts = [f"z({p:.3f})={z_for(p):.4f}" for p in (0.90, 0.95, 0.975, 0.995)] print(" ".join(parts)) mu, sigma = 120, 15 print(f"x90={mu + round(z_for(0.90), 2) * sigma:.1f}")

H-W7 (1.645 as the mean of two cells; solving P(−z < Z < z) = 1 − α) — shape and convention only; IBS1 §6.2 (percentile problems, re-derived for the cumulative table); original dataset

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/b3f4e628-a7a7-46f3-8b89-a089c47bf32b/flashcard utf-8 LF