Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In a game of chance, you can sometimes use probability theory to compute the expected gain (or loss) for playing the game. Sometimes the strategy you use and the choices you make while playing affect the game's outcome; other times the outcome is completely determined by the rules of the game. Even if you cannot calculate the probabilities exactly, you can estimate the expected gain by simulating the game many times and averaging the gains and losses of the simulated games.
This section analyzes a coin game with the following rules: