/Coin-Toss-Game

Simulating a coin tossing game

Primary LanguageJupyter NotebookMIT LicenseMIT

CoinToss

This notebook simulates a coin tossing game where the player gets to pick a string of head/tail occurances as the endgame. A coin is tossed until the chosen sequence of head/tail occurs. When the endgame sequence occurs the game ends. The objective is finding the sequence of head/tail occurances (for a given sequence length) that will be end the game with the least number of tosses. This is simulated by running a given number of coin toss games with the chosen endgame sequence. The avarage number of tosses required to win is computed and its distribution is plotted.