Exercise 2: A Feature-Flag Rollout's Risk Profile — Possible Solution ==================================================================== GIVEN ------------------------------ P(X=0) = 0.85 (no issues) P(X=2000) = 0.12 (minor rollback) P(X=80000) = 0.03 (major outage) STEP 1: E[X] ------------------------------ E[X] = (0)(0.85) + (2000)(0.12) + (80000)(0.03) = 0 + 240 + 2400 = 2640 The expected cost of the rollout is $2,640. STEP 2: E[X^2] ------------------------------ E[X^2] = (0^2)(0.85) + (2000^2)(0.12) + (80000^2)(0.03) = 0 + (4,000,000)(0.12) + (6,400,000,000)(0.03) = 0 + 480,000 + 192,000,000 = 192,480,000 STEP 3: Var(X) AND SD(X) ------------------------------ Var(X) = E[X^2] - (E[X])^2 = 192,480,000 - (2640)^2 = 192,480,000 - 6,969,600 = 185,510,400 SD(X) = sqrt(185,510,400) ~= $13,620 WHAT THIS MEANS FOR "IS IT SAFE ENOUGH" ------------------------------ The standard deviation (~$13,620) is more than five times larger than the expected value ($2,640) - an even more extreme ratio than this chapter's own incident-cost example. Per this chapter's own finding, this signals a highly skewed, risky distribution: the expected value alone makes the rollout look modest and manageable, but that number is almost entirely an artifact of averaging in a rare, very expensive outage scenario. Relying on E[X] alone to judge "is this safe" would be misleading - the real question is whether the organization can absorb an $80,000 major-outage cost if the unlucky 3% outcome actually occurs, not just whether the average cost looks small. WHY THIS WORKS AS AN ANSWER ------------------------------ Both E[X] and Var(X)/SD(X) are computed directly from this chapter's own formulas, and the risk interpretation is grounded in this chapter's own finding about a large standard deviation relative to the mean signalling understated risk, rather than treating the expected value figure alone as a complete answer to whether the rollout is safe.