In the game of red and black, a player starts with an initial fortune \(x_0\) and bets (at even stakes) on independent trials for which the probability of winning is \(p\). Play continues until the player is either ruined or reaches a fixed target fortune \(a\).
With bold play, the player bets her entire fortune or just what is needed to reach the target (whichever is smaller). Random variable \(W\) indicates the event that the player wins (reaches her target) and variable \(N\) is the number of trials played. The parameters \(x_0\) and \(p\) and \( a \) can be varied with the input controls.