By way of Daniel McDonald, I recently came across Peter Norvig’s iPython notebook exploring probability. Peter Norvig is the director of research at Google, and his courses tend to do a great job of breaking down complex concepts into digestible ideas and clean code. This notebook is no exception.
The notebook explores basic probability and the Monte Haul problem using some straightforward code for exploring sample spaces. It then extends this code to deal with some statistical ‘paradoxes’ like the Two Child Problem. Some of the most interesting parts of the discussion hinge on the sample spaces that would be required to make particular results true.
In any case, if you are interested in statistics and/or python, this is a good read. If you like the notebook, you may also be interested in checking out his free online course on programming principles (h/t Justin Kuczynski), or “Artificial Intelligence: a modern approach”, his canonical text on artificial intelligence, which has accumulated a few* citations.