## Mathematical Calculation of Risk of Ruin For a Fixed EV

Applies to a fixed expectation with a fixed bet of 1 unit

let win = probability of win

let loss = probability of loss

let tie = probability of tie (win + loss + tie = 1)

let bank = number of units gambler is willing to risk

let profit = number of units gambler hopes to win

let goal = bank + profit = number of units gambler wishes to achieve

let S_{bank} = probability of succeeding with bank units

S_{goal} = 1, since if goal is reached chance of success = 1

S_{0} = 0, since if gambler has 0 units chance of success = 0

S_{bank} = win*S_{bank+1} + loss*S_{bank-1} + tie*S_{bank}

Since win + loss + tie = 1

- (win + loss + tie) * S
_{bank}= win*S_{bank+1}+ loss*S_{bank-1}+ tie*S_{bank} - win*S
_{bank}+ loss*S_{bank}+ tie*S_{bank}= win*S_{bank+1}+ loss*S_{bank-1}+ tie*S_{bank} - win*S
_{bank}+ loss*S_{bank}= win*S_{bank+1}+ loss*S_{bank-1} - win*(S
_{bank+1}- S_{bank}) = loss*(S_{bank}- S_{bank-1}) - S
_{bank+1}- S_{bank}= loss/win*(S_{bank}- S_{bank-1}) - if bank = 1, S
_{2}- S_{1}= loss/win*(S_{1}- S_{0}) - since S
_{0}= 0, S_{2}- S_{1}= loss/win*(S_{1}) - if bank = 2, S
_{3}- S_{2}= loss/win*(S_{2}- S_{1}) - since S
_{2}- S_{1}= loss/win*(S_{1}), S_{3}- S_{2}= (loss/win)^{2}* S_{1} - in general if bank = x, S
_{x+1}- S_{x}= (loss/win)^{x}* S_{1}where (0 < x < goal) - Sum(S
_{x+1}- S_{x}) = Sum((loss/win)^{x}* S_{1}) as x varies from 1 to x - Sum(S
_{x+1}- S_{x}) = (S_{2}-S_{1})+(S_{3}-S_{2})+(S_{4}-S_{3})+....+(S_{x}-S_{x-1})+(S_{x+1}-S_{x}) as x varies from 1 to x - Sum(S
_{x+1}- S_{x}) = S_{x+1}- S_{1}= Sum((loss/win)^{x}* S_{1}) as x varies from 1 to x - S
_{x+1}= S_{1}+ Sum((loss/win)^{x}* S_{1}) as x varies from 1 to x - S
_{x+1}= S_{1}* (1 + Sum((loss/win)^{x}) as x varies from 1 to x - since (loss/win)
^{0}= 1, S_{x+1}= Sum((loss/win)^{x}) as x varies from 0 to x - Sum((loss / win)
^{x}) is the sum of a geometric sequence whose initial term equals 1 - S
_{x+1}= S_{1}* (1 - (loss/win)^{x+1}) / (1 - loss/win) - Let x = goal - 1 and since S
_{goal}= 1, 1 = S_{1}* (1 - (loss/win)^{goal}) / (1 - loss/win) - S
_{1}= (1 - loss/win) / (1 - (loss/win)^{goal}) - substituting 20 into 18,
S
_{x+1}= (1 - (loss/win)^{x+1}) / (1 - (loss/win)^{goal}) - if x = bank - 1,
S
_{bank}= (1 - (loss/win)^{bank}) / (1 - (loss/win)^{goal}) - S
_{bank}= (1 - (loss/win)^{bank}) / (1 - (loss/win)^{goal}) = probability of reaching goal with bank units

Let R = probability of ruin

R = (1 - probability of success) = (1 - S_{bank})

R = 1 - (1 - (loss/win)^{bank}) / (1 - (loss/win)^{goal})

R = (1 - (loss/win)^{goal}) / (1 - (loss/win)^{goal}) -
(1 - (loss/win)^{bank}) / (1 - (loss/win)^{goal})

R = ((loss/win)^{bank} - (loss/win)^{goal}) / (1 - (loss/win)^{goal}) =
probability of of being ruined with a bank of bank units and a goal of goal units