The Probability of Ruin Matrix - How to calculate?

Hello guys,

In one of the books Im studying related to trading and finance, I have come across a table called; The probability of Ruin Matrix.

The author does not mention where he got it from. He might have made it himself, but Im guessing he got it somewhere else. Here it is:

Profit/Loss Ratio - P/R
Winning Percentage - % Win

Code:
             % winner
P/R     30%     40%     50%    60%
__________________________________
1:1       99       88         50       12
2:1       74       14          2        0
3:1       23       5            1        0
4:1       14       5            1        0

* Ruin is defined as a 50% drawdown from starting equity

What this table tells us is that if we for example have 40% winners with a 2:1 P/R ratio, the probability of ruin is 14%.

I guess this translates to a probability of 14% that we will experience 60 losers in a row.

What I want to ask you guys is if you have any clue how to calculate this formula/table?

I am making an excel sheet where I want to find the probability of ruin and its relation to account size, different P/R ratio, different W/R ratio, etc.

That`s why I need the formula.

Thank you all very much in advance!

Best regards,