Title has a specific example, but I'm interested in an equation I can put in my spreadsheet, so let's define some variables.
I've been offered a bet and I can take it as many times as I want.
C = how much I have to pay to play
P = probability of winning
R = the amount of money returned if I win
T = the total amount of money I start with
K = probability of having M * T dollars before losing it all
I'm looking to solve for T given all the other variables.
I'm fine with calculating expected values and odds of winning / losing some specific number of permutations, but this problem seems to involve the residual amount of money left from past wins, makes me think I need to break out calculus and integrate something. Not really sure how I should approach this (other than coding a simulation, but I'd prefer an equation).