~/ learn/ afm-113/ cards/ Normal probabilities with the cumulative table
1 of 6

Compute the four probabilities for X ~ N(120, 15²) with Φ built from math.erf: below 138, above 99, between 105 and 135, above 150.

Compute the four probabilities for X ~ N(120, 15²) with Φ built from math.erf: below 138, above 99, between 105 and 135, above 150.

Answer

import math def phi(z): return 0.5 * (1 + math.erf(z / math.sqrt(2))) mu, sigma = 120, 15 z = lambda x: (x - mu) / sigma below = phi(z(138)) above = 1 - phi(z(99)) between = phi(z(135)) - phi(z(105)) tail = 1 - phi(z(150)) print(f"P(X<138)={below:.4f} P(X>99)={above:.4f} P(105<X<135)={between:.4f} P(X>150)={tail:.4f}")

IBS1 §6.2 (the three problem types — lookups re-derived for the cumulative table; IBS1’s Table A11 is area from 0 to z), CC BY 4.0 — shape only; original dataset

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/8d03dc78-72f3-4dee-8b9c-de776e049afb/flashcard utf-8 LF