In: Statistics and Probability
R Programming Question
Marie plays gambling. With the initial balance, a single play results in either gain(+1) or loss(-1) with probabilities of 0.5. She stops the game when her balance becomes either 0 or 20.
How could I obtain a Monte Carlo distribution of the duration of single game with 2,000 simulated trials?
Game Duration : # of plays in a single game.