The sum and product rules give p(T=1) = Σc p(T=1 | C=c) p(C=c), and Bayes' theorem turns the test's error rates into what a patient wants to know, p(C=1 | T=1). When the disease is rare, most positive tests come from the large healthy group, so even an accurate test gives a modest posterior. The second view applies the same rule to a bent coin: each flip updates the probability that its concave side is heads, and today's posterior is tomorrow's prior.
code/ch02_probabilities.py (functions screening, screening_sequence, coin_posterior).