Conditional probability in Python: two children, Monty Hall, and updating on evidence
The R section of Blitzstein and Hwang’s second chapter, rebuilt in Python in the style of CS61A: predicates as values, a frequency that estimates P(A|B), and a Monty Hall game split into pure logic and input.