# How Flight Works 8, Exercise 1: how much does a second checker help? # Chance that all steps are done = (1 - miss) ** steps for one reader, and # (1 - miss * miss) ** steps if a second person independently catches a miss. # P_MISS values are illustrative, not real data. STEPS = 20 for p in (0.01, 0.02, 0.05): one = (1 - p) ** STEPS two = (1 - p * p) ** STEPS print("miss chance", p, "-> one reader", round(one * 100, 1), "%, two checkers", round(two * 100, 2), "%") # Output when run: # miss chance 0.01 -> one reader 81.8 %, two checkers 99.8 % # miss chance 0.02 -> one reader 66.8 %, two checkers 99.2 % # miss chance 0.05 -> one reader 35.8 %, two checkers 95.12 % # # A single reader's chance of a perfect run falls quickly as the list grows or the # miss chance rises. A second, independent check turns a poor result into a good # one, which is why a challenge-and-response checklist is used.