Playing around with Polya’s Urn thanks to Ole Peters and Marcos Carreira

I saw a great twitter thread earlier in the week:



With the results and the code presented so nicely, diving into Polya’s Urn with my younger so this weekend was a no brainer!

I started by explaining the problem and asking for his thoughts. His intuition about how the game and how it would play out was fascinating to hear:



After he explained what he thought would happen, we played the game once:



Next we went to the computer to explore the game in more detail. Before diving in, though, I had my son explain Carreira’s code:



Finally, we played the game a few times and looked at the different outcomes. The results really are amazing. Hopefully we’ll do a follow up project tomorrow: