Flipping Coins

Simon created this coin flip simulation in the form of a game that runs until you get 10 heads in a row. In the video, he explains what the chance that you get 10 heads in a row is, and how he calculated the average number of flips it should take. We also actually play the game and get very lucky the first time and very unlucky the second time. Simon talks about the code he wrote in the second part of the video.

Simon also built another coin flip game in Processing: Coin Flip simulation that doubles the number of coins in the pot as long as you get consecutive heads and clears the pot once you throw tails. At one point, Simon got 12 heads in a row, which means that he had 2^12 coins in the pot (4096). What is the chance of getting that? (It’s actually 1 in 8192). How cool is that?

More images of the game:

Screen Shot 2018-02-19 at 15.53.40

Screen Shot 2018-02-19 at 17.20.57

Screen Shot 2018-02-19 at 17.22.31

Screen Shot 2018-02-19 at 19.31.58

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s