[Math] Playing the St. Petersburg Lottery until I lose everything

probabilityprobability theory

This question continues the following question: Calculating the probability of winning at least $128$ dollars in a lottery St. Petersburg Paradox

Here is a lottery: A fair coin is flipped repeatedly until it produces "heads." If the first occurrence of heads is on the $n$th toss, you are paid $2^{n−1}$. So for instance, if heads appears on the first toss, you are paid 1 dollar; if heads appears for the first time on the second toss, you are paid 2 dollars, and so on.

Say the cost of entering the lottery is 10 dollars and I start with 100 dollars. I'll play the lottery again and again until I have more than 10 dollars to play the game.

Now my question is, what is the probability that I can go on playing the game?

Example: Say during the first game, I get a heads on the first toss then I'll be left with 91(=100-10+1) dollars. I'll play the game again by paying 10 dollars and this time I may get a heads on the 7 toss and now I'll have 145(=91-10+64) dollars and so on.

Edit: Or Is it possible to find the probability of surviving the nth round given that I have survived all the previous rounds??

Best Answer

I do not see an easy approach, so I tried a simulation in R using the following code, which sees whether you lose in the first million games, repeated $100000$ times:

set.seed(2015)
subgames   <- 10
supergames <- 100000 # maximum games is supergames*subgames
cases      <- 100000 
gain     <- function(x, y=10){ ifelse(y<10, y, y + 2^-ceiling(log(x,2)) -10) }
position <- matrix(rep(NA,(subgames+1) * cases), nrow=cases)
position[, 1] <- 100 # start with 100
for (r in 1:supergames){
    subcases <- nrow(position)
    udata <- matrix( runif(subgames * subcases ), nrow=subcases )
    for (n in 1:subgames ){ position[, n+1] <- gain(udata[,n], position[,n]) } 
    position[, 1] <- position[, subgames+1]     # ready to restart 
    position <- position[position[,1] >= 10, ] # remove lost games
    }
nrow(position)/cases

It produced the result 0.00021, suggesting that the simulation lost $99979$ times but failed to lose $21$ times. Of those $21$ cases, after a million games the surviving bankrolls were in the range $68183$ to $17492689$ in this particular simulation, so there was a net average gain.

Obviously there is uncertainty associated with any simulation and there may be further losses as the number of games increases further, but this suggests the probability of not losing overall is extremely small. About $82\%$ of losses seemed to have happened in the first twenty games and about $97\%$ of losses in the first hundred games, so the unbounded potential gains do not often offset the price of playing repeated games.

Related Question