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 timid play, the player bets 1 on each trial. 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\), \(p\) and \( a \) can be varied with the scrollbars.