# How Flight Works 10, Exercise 3: how do layers of defence add up? # If each of N independent safeguards fails 1 time in 10, the chance that all fail together is (1/10)^N. Show how fast the odds shrink, and what that means for 40 million flights a year. # Illustrative model only; real safeguards are never perfectly independent. P = 0.1 FLIGHTS = 40_000_000 for n in (1, 2, 3, 4, 5): p = P ** n print(n, "layers -> chance", format(p, "g"), ", about", round(p * FLIGHTS), "of", FLIGHTS, "flights") # Output when run: # 1 layers -> chance 0.1 , about 4000000 of 40000000 flights # 2 layers -> chance 0.01 , about 400000 of 40000000 flights # 3 layers -> chance 0.001 , about 40000 of 40000000 flights # 4 layers -> chance 0.0001 , about 4000 of 40000000 flights # 5 layers -> chance 1e-05 , about 400 of 40000000 flights # # Each independent layer cuts the odds tenfold. Real layers are not perfectly independent, which is why investigators look for shared causes and why the figures are only a model. The 40 million flights is a round number, not a statistic.