Image for post
Image for post
Gambler’s Ruin Demo App

Random Walks

Back to Gambler’s Ruin

            (1)  P = i/N
            Let r = q/p where q = (1-p)/p.  Then
the probability of winning is
(2) P = (1 - r^i)/(1 - r^N) and the probability of ruin i (3) Q = 1 - P

Application 1: Insurance

             (4)             Q = r^i
            (5)        Q(100) = 0.9608^100 = 0.018
            (6)        Q(200) = 0.9608^200 = 0.00034

Application 2: Trading Stocks

           r = q/p = 0.8182           P = (1 - r^5)/(1 - r^10) = 0.7318

References

Written by

jxxcarlson on elm slack, http://jxxcarlson.github.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store