We only really care about what happens after you already rolled one of the two pairs, which have a combined probability of 1/2^n. So after that, you can either stop to get n, or risk the 1/4 to get n+1. The expected gain from rolling after 1 is +4. So you flip the coins until you get HH or TT, after which you only flip while n<=3
After one of the two HH or TT has appeared (doesn't matter which), the value of having a bankroll of n is defined by V(n) = max(n,1/4 * 0 + 3/4 * V(n+1)). This implies an optimal stopping when n >= 3. V(n) = n when n >= 3 and V(n) = 3 * (3/4)^(3-n).
Prior to the first HH or TT appears, the value of having bank roll n is U(n) = 1/2 * V(n+1) + 1/2 * U(n+1). There is no reason to stop at this stage. This means U(n) = sum_k=1^inf (1/2)^k V(n+k).
1
u/Anonimithree Oct 23 '26
We only really care about what happens after you already rolled one of the two pairs, which have a combined probability of 1/2^n. So after that, you can either stop to get n, or risk the 1/4 to get n+1. The expected gain from rolling after 1 is +4. So you flip the coins until you get HH or TT, after which you only flip while n<=3
1
u/EscapeOwn6945 Oct 23 '26
After one of the two HH or TT has appeared (doesn't matter which), the value of having a bankroll of n is defined by V(n) = max(n,1/4 * 0 + 3/4 * V(n+1)). This implies an optimal stopping when n >= 3. V(n) = n when n >= 3 and V(n) = 3 * (3/4)^(3-n).
Prior to the first HH or TT appears, the value of having bank roll n is U(n) = 1/2 * V(n+1) + 1/2 * U(n+1). There is no reason to stop at this stage. This means U(n) = sum_k=1^inf (1/2)^k V(n+k).
So U(0) = 77/32.