Steven R. Dunbar
Department of Mathematics
203 Avery Hall
University of Nebraska-Lincoln
Lincoln, NE 68588-0130
http://www.math.unl.edu
Voice: 402-472-3731
Fax: 402-472-8466
Topics in
Probability Theory and Stochastic Processes
Steven R. Dunbar
__________________________________________________________________________
Ruin Probabilities
_______________________________________________________________________
Note: These pages are prepared with MathJax. MathJax is an open source JavaScript display engine for mathematics that works in all browsers. See http://mathjax.org for details on supported browsers, accessibility, copy-and-paste, and other features.
_______________________________________________________________________________________________
Mathematically Mature: may contain mathematics beyond calculus with proofs.
_______________________________________________________________________________________________
What is the solution of the recurrence equation ${x}_{n}=a{x}_{n-1}$ where $a$ is a constant? What kind of a function is the solution? What more, if anything, is necessary to obtain a complete solution?
_______________________________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
Consider a sequence of Bernoulli random variables, ${Y}_{1},{Y}_{2},{Y}_{3},\dots $. Start with a given initial value ${Y}_{0}>0$. For $i\ge 1$, deﬁne the random variables ${Y}_{i}=+1$ with probability $p$ and ${Y}_{i}=-1$ with probability $q=1-p$. Deﬁne the sequence of sums ${T}_{n}={\sum}_{i=0}^{n}{Y}_{i}$. Consider the probability that the process ${T}_{1},{T}_{2},{T}_{3},\dots $ will achieve the value $0$ before it achieves the value $a$. This is a special case of a larger class of probability problems called ﬁrst-passage probabilities.
Consider a gambler who wins or loses a dollar on each turn of a game with probabilities $p$ and $q=1-p$ respectively. Let his initial capital be ${T}_{0}>0$. The game continues until the gambler’s capital either reduces to $0$ or increases to $a$. Let ${q}_{{T}_{0}}$ be the probability of the gambler’s ultimate ruin and ${p}_{{T}_{0}}$ the probability of his winning. The next section shows that
so that an unending game has probability $0$.
Theorem 1. The probability of the gambler’s ruin is
if $p\ne q$ and
if $p=q=1\u22152$.
Proof. The proof uses a ﬁrst step analysis considering how the probabilities change after one step or trial. After the ﬁrst trial the gambler’s fortune is either ${T}_{0}-1$ or ${T}_{0}+1$ and therefore
$${q}_{{T}_{0}}=p{q}_{{T}_{0}+1}+q{q}_{{T}_{0}-1}$$ | (1) |
provided $1<{T}_{0}<a-1$. For ${T}_{0}=1$, the ﬁrst trial may lead to ruin, and
replaces (1). Similarly, for ${T}_{0}=a-1$ the ﬁrst trial may result in victory, and therefore
To unify our equations, deﬁne as a natural assumption that ${q}_{0}=1$, and ${q}_{a}=0$. Then the probability of ruin satisﬁes (1) for ${T}_{0}=1,2,\dots ,a-1$. This deﬁnes a set of $a-1$ diﬀerence equations, with boundary conditions at $0$ and $a$. Solve the system of diﬀerence equations to obtain the desired probability ${q}_{{T}_{0}}$ for any value of ${T}_{0}$.
Rewrite the diﬀerence equations as
Rearrange and factor to obtain
This says the ratio of successive diﬀerences of ${q}_{{T}_{0}}$ is constant. This suggests that ${q}_{{T}_{0}}$ is a power function,
since power functions have this property.
First take the case when $p\ne q$. Then based on the guess above (or also on standard theory for linear diﬀerence equations), try a solution of the form ${q}_{{T}_{0}}={\lambda}^{{T}_{0}}$. That is
This reduces to
Since $p+q=1$, this factors as
so the solutions are $\lambda =q\u2215p$, and $\lambda =1$. (One could also use the quadratic formula to obtain the same values.) Again by the standard theory of linear diﬀerence equations, the general solution is
$${q}_{{T}_{0}}=A\cdot 1+B\cdot {\left(q\u2215p\right)}^{{T}_{0}}$$ | (2) |
for some constants $A$, and $B$.
Determine the constants by using the boundary conditions:
$$\begin{array}{llll}\hfill {q}_{0}& =A+B=1\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {q}_{a}& =A+B{\left(q\u2215p\right)}^{a}=0.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$Solving, substituting, and simplifying:
(Check for yourself that with this expression $0\le {q}_{{T}_{0}}\le 1$ as it should be a for a probability.)
To show that the solution is unique, suppose ${r}_{{T}_{0}}$ is another solution of the diﬀerence equations. Given an arbitrary solution of (1), determine the two constants $A$ and $B$ so that (2) agrees with ${r}_{{T}_{0}}$ at ${T}_{0}=0$ and ${T}_{0}=a$. From these two values, ﬁnd all other values by substituting in (1) successively ${T}_{0}=1,2,3,\dots $ Therefore, two solutions which agree for ${T}_{0}=0$ and ${T}_{0}=1$ are identical, hence every solution is of the form (2).
The solution breaks down if $p=q=1\u22152$, since then the diﬀerence equation does not have two linearly independent solutions (the solution $1$ repeats twice). Instead, borrow a result from diﬀerential equations (from the variation-of-parameters/reduction-of-order set of ideas used to derive a complete linearly independent set of solutions.) Certainly, $1$ is still a solution of the diﬀerence equation (1). A second linearly independent solution is ${T}_{0}$, and the general solution is ${q}_{{T}_{0}}=A+B{T}_{0}$. To satisfy the boundary conditions, we must put $A=1$, and $A+Ba=0$, hence ${q}_{{T}_{0}}=1-{T}_{0}\u2215a$. □
Consider a symmetric interpretation of this gambling game. Instead of a single gambler playing at a casino, trying to make a goal $a$ before losing everything, consider two gamblers Alice and Bill playing against each other. Let Alice’s initial capital be ${T}_{0}$ and let her play against adversary Bill with initial capital $a-{T}_{0}$ so that their combined capital is $a$. The game continues until one gambler’s capital either reduces to zero or increases to $a$, that is, until the ruin of one of the two players.
Proof. The probability ${p}_{{T}_{0}}$ of Alice’s winning the game equals the probability of Bill’s ruin. Bill’s ruin (and Alice’s victory) is therefore obtained from our ruin formulas on replacing $p$, $q$, and ${T}_{0}$ by $q$, $p$, and $a-{T}_{0}$ respectively. That is, from our formula (for $p\ne q$) the probability of Alice’s ruin is
and the probability of Bill’s ruin is
Then add these together, and after some algebra, the total is $1$.
For $p=1\u22152=q$, the proof is simpler, since then ${p}_{{T}_{0}}=1-\left(a-{T}_{0}\right)\u2215a$, and ${q}_{{T}_{0}}=1-{T}_{0}\u2215a$, and ${p}_{{T}_{0}}+{q}_{{T}_{0}}=1$ easily. □
Proof. In the game, the gambler’s last gain (or loss) is a Bernoulli (two-valued) random variable, $G$, where $G$ assumes the value $-{T}_{0}$ with probability ${q}_{{T}_{0}}$, and assumes the value $a-{T}_{0}$ with probability ${p}_{{T}_{0}}$. Thus the expected value is
$$\begin{array}{llll}\hfill \mathbb{E}\left[G\right]& =\left(a-{T}_{0}\right){p}_{{T}_{0}}+\left(-{T}_{0}\right){q}_{{T}_{0}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={p}_{{T}_{0}}a-{T}_{0}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\left(1-{q}_{{T}_{0}}\right)a-{T}_{0}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$ □Now notice that if $q=1\u22152=p$ in a fair game, then $\mathbb{E}\left[G\right]=\left(1-\left(1-{T}_{0}\u2215a\right)\right)\cdot a-{T}_{0}=0$. That is, a fair game in the short run (one trial) is a fair game in the long run (expected value). However, if $p<1\u22152<q$, so the game is not fair then the expectation formula says
$$\begin{array}{llll}\hfill \mathbb{E}\left[G\right]& =\left(1-\frac{{\left(q\u2215p\right)}^{a}-{\left(q\u2215p\right)}^{{T}_{0}}}{{\left(q\u2215p\right)}^{a}-1}\right)a-{T}_{0}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{{\left(q\u2215p\right)}^{{T}_{0}}-1}{{\left(q\u2215p\right)}^{a}-1}a-{T}_{0}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\left(\frac{\left[{\left(q\u2215p\right)}^{{T}_{0}}-1\right]a}{\left[{\left(q\u2215p\right)}^{a}-1\right]{T}_{0}}-1\right){T}_{0}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$The sequence $\left[{\left(q\u2215p\right)}^{n}-1\right]\u2215n$ is an increasing sequence, so
This shows that an unfair game in the short run (one trial) is an unfair game in the long run.
Corollary 3. The probability of ultimate ruin of a gambler with initial capital ${T}_{0}$ playing against an inﬁnitely rich adversary is
and
Proof. Let $a\to \infty $ in the formulas. (Check it out!) □
Remark. This corollary says that the probability of “breaking the bank at Monte Carlo” as in the movies is zero, at least for simple games.
$p$ | $q$ | ${T}_{0}$ | $a$ | Probability | Probability | Expected | |
of Ruin | of Victory | Gain | |||||
0.5 | 0.5 | 9 | 10 | 0.1000 | 0.9000 | 0 | |
0.5 | 0.5 | 90 | 100 | 0.1000 | 0.9000 | 0 | |
0.5 | 0.5 | 900 | 1,000 | 0.1000 | 0.9000 | 0 | |
0.5 | 0.5 | 950 | 1,000 | 0.0500 | 0.9500 | 0 | |
0.5 | 0.5 | 8,000 | 10,000 | 0.2000 | 0.8000 | 0 | |
0.45 | 0.55 | 9 | 10 | 0.2101 | 0.7899 | -1 | |
0.45 | 0.55 | 90 | 100 | 0.8656 | 0.1344 | -77 | |
0.45 | 0.55 | 99 | 100 | 0.1818 | 0.8182 | -17 | |
0.4 | 0.6 | 90 | 100 | 0.9827 | 0.0173 | -88 | |
0.4 | 0.6 | 99 | 100 | 0.3333 | 0.6667 | -32 | |
We often hear from people who consistently win at the casino. How can this be in the face of the theorems above?
A simple illustration makes clear how this is possible. Assume for convenience a gambler who repeatedly visits the casino, each time with a certain amount of capital. His goal is to win 1/9 of his capital. That is, in units of his initial capital ${T}_{0}=9$, and $a=10$. Assume too that the casino is fair so that $p=1\u22152=q$, then the probability of ruin in any one visit is:
That is, if the working capital is much greater than the amount required for victory, then the probability of ruin is reasonably small.
Then the probability of an unbroken string of ten successes in ten years is:
This much success is reasonable, but simple psychology would suggest the gambler would boast about his skill instead of crediting it to luck. Moreover, simple psychology suggests the gambler would also blame one failure on oversight, momentary distraction, or even cheating by the casino!
Another common interpretation of this probability game is to imagine it as a random walk. That is, imagine an individual on a number line, starting at some position ${T}_{0}$. The person takes a step to the right to ${T}_{0}+1$ with probability $p$ and takes a step to the left to ${T}_{0}-1$ with probability $q$ and continues this random process. Then instead of the total fortune at any time, consider the geometric position on the line at any time. Instead of reaching ﬁnancial ruin or attaining a ﬁnancial goal, instead consider reaching or passing a certain position. For example, Corollary 3 says that if $p\le q$, then the probability of visiting the origin before going to inﬁnity is $1$. The two interpretations are equivalent and both are useful depending on context. The problems below use the random walk interpretation, because they are more naturally posed in terms of reaching or passing certain points on the number line.
The following unusual example appeared as a weekly puzzle at the website FiveThirtyEight, The Riddler, August 4, 2017..
A class of $30$ children is playing a game where they all stand in a circle along with their teacher. The teacher is holding two things: a coin and a potato. The game progresses like this: The teacher tosses the coin. Whoever holds the potato passes it to the left if the coin comes up heads and to the right if the coin comes up tails. The game ends when every child except one has held the potato, and the one who hasn’t is the winner. How do a child’s chances of winning change depending on where they are in the circle? In other words, what is each child’s win probability?
Before solving the original problem, ﬁrst consider a smaller example. Consider a random walk on a circle, labeled at $4$ equally spaced points $0$ through $3$, the walk starting at $0$. Equivalently, consider the random walk on the group ${\mathbb{Z}}_{4}$ and use all possible representations for the values of ${\mathbb{Z}}_{4}$, sometimes from $0$ to $3$ as usual, sometimes from $-2$ to $1$ and sometimes from $-1$ to $2$ as convenient.
Consider the potato game on this $4$-vertex circle, and speciﬁcally consider the probability that all points on the circle are covered except for the vertex $2$, that is, in the potato game with teacher $0$ and $3$ students, the student $2$ (equivalently $-2$) is the winner.
Unfold the circle and use the theorem on ruin probabilities for a fair walk starting at $0$ and terminating with ruin at $-a$ or victory at $b$
Now consider the original potato game with teacher $0$ and $30$ children and speciﬁcally consider the probability that all children are covered except for child $17$, for example. That is, in the potato game with teacher $0$ and $30$ students, student $17$ (equivalently $-14$) is the winner. The example uses student $17$ because this position is not symmetric with respect to the teacher.
Finally generalize the potato game to have $N$ children. Consider the probability that all children have held the potato except for child $b$, where $b\le N$. Let $a=N-b\ge 0$ When necessary, equivalently label students around the circle with alternative values from ${\mathbb{Z}}_{N+1}$. Then in the potato game with teacher $0$ and $N$ students, student $b$, or equivalently $-a$ is the winner.
This result of uniform probability is somewhat surprising. For fair random walk on the line, the probability of being at a particular position after $n$ steps has a binomial probability, with about $68\%$ of the probability being in the interval $\left[-\sqrt{n},\sqrt{n}\right]$, and $95\%$ of the probability in the interval $\left[-\sqrt{n},\sqrt{n}\right]$, and the probability drops oﬀ rapidly. Then wrapping the probabilities onto the circle, it would seem that the probabilities of the potato (or the random walk) passing through the symmetrical adjacent positions $1$ and $30$ should be relatively large and probability of being at positions $15$ and $16$ opposite the teacher should be relatively small. At ﬁrst glance, it would seem that students $1$ and $30$ adjacent to the teacher will seldom win and that positions $15$ or $16$ should have the highest probability of winning. However, the game stops at a random time, after visiting all but one position, not a ﬁxed time. The next section will show that the expected time is $435$ steps. After $400$ steps, the standard deviation of the fair random walk is $20$, and wrapping the random walk onto the circle will cover the circle. Some sample paths will stay on one side of the teacher and then positions $1$ or $30$ can still win. Some sample paths will oscillate back and forth across the teacher’s position, as in the ﬁgure, and positions $15$ or $16$ can win.
The fortune in the coin-tossing game is the ﬁrst and simplest encounter with two of the most important ideas in modern probability theory.
We can interpret the fortune in our gambler’s coin-tossing game as a Markov process. That is, at successive times the process is in various states. The states are the values of the fortune. The probability of passing from one state at the current time $t$ to another state at time $t+1$ is completely determined by the present state. That is, for our coin-tossing game
$$\begin{array}{llll}\hfill \mathbb{P}\left[{T}_{t+1}=x+1|{T}_{t}=x\right]& =p\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \mathbb{P}\left[{T}_{t+1}=x-1|{T}_{t}=x\right]& =q\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \mathbb{P}\left[{T}_{t+1}=y|{T}_{t}=x\right]& =0\text{forall}y\ne x+1,x-1\text{}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$The most important property of a Markov process is that the probability of being in the next state is completely determined by the current state and not the history of how the process arrived at the current state. In that sense, we often say that a Markov process is memory-less.
We can also note the fair coin-tossing game with $p=1\u22152=q$ is a martingale. That is, the expected value of the process at the next step is the current value. Using expectation for estimation, the best estimate we have of the gambler’s fortune at the next step is the current fortune:
This characterizes a fair game, after the next step, one can neither expect to be richer or poorer. Note that the coin-tossing games with $p\ne q$ do not have this property.
This section is adapted from W. Feller, in Introduction to Probability Theory and Applications, Volume I, Chapter XIV, page 342, [1]. Some material is adapted from [3] and [2]. Steele has an excellent discussion at about the same level as here, but with a slightly more rigorous approach to solving the diﬀerence equations. He also gives more information about the fact that the duration is almost surely ﬁnite, showing that all moments of the duration are ﬁnite. Karlin and Taylor give a treatment of the ruin problem by direct application of Markov chain analysis, which is not essentially diﬀerent, but points to greater generality.
_______________________________________________________________________________________________
The goal is to simulate the probability function for ruin with a given starting value. First set the probability $p$, number of Bernoulli trials $n$, and number of experiments $k$. Set the ruin and victory values $r$ and $v$, the boundaries for the random walk. For each starting value from ruin to victory, ﬁll an $n\times k$ matrix with the Bernoulli random variables. Languages with multi-dimensional arrays keeps the data in a three-dimensional array of size $n\times k\times \left(v-r+1\right)$. Cumulatively sum the Bernoulli random variables to create the fortune or random walk. For each starting value, for each random walk or fortune path, ﬁnd the step where ruin or victory is encountered. For each starting value, ﬁnd the proportion of fortunes encountering ruin. Finally, ﬁnd a least squares linear ﬁt of the ruin probabilities as a function of the starting value.
R script for ruin probabilities.
Octave script for ruin probabilities.
Perl PDL script for ruin probabilities.
Scientiﬁc Python script for ruin probabilities.
__________________________________________________________________________
Use “ﬁrst step analysis” to write three equations in three unknowns (with two additional boundary conditions) that give the probability that the gambler will be ruined. Solve the equations to ﬁnd the ruin probability.
Compute the expected number of visits $\mathbb{E}\left[N\right]$ to level $a$.
Consider a naive model for a stock that has a support level of $20/share because of a corporate buy-back program. (This means the company will buy back stock if shares dip below $20 per share. In the case of stocks, this reduces the number of shares outstanding, giving each remaining shareholder a larger percentage ownership of the company. This is usually considered a sign that the company’s management is optimistic about the future and believes that the current share price is undervalued. Reasons for buy-backs include putting unused cash to use, raising earnings per share, increasing internal control of the company, and obtaining stock for employee stock option plans or pension plans.) Suppose also that the stock price moves randomly with a downward bias when the price is above $20, and randomly with an upward bias when the price is below $20. To make the problem concrete, we let ${S}_{n}$ denote the stock price at time $n$, and we express our stock support hypothesis by the assumptions that
$$\begin{array}{rcll}\mathbb{P}\left[{S}_{n+1}=21|{S}_{n}=20\right]& =& 9\u221510& \text{}\\ \mathbb{P}\left[{S}_{n+1}=19|{S}_{n}=20\right]& =& 1\u221510& \text{}\end{array}$$
We then reﬂect the downward bias at price levels above $20 by requiring that for $k>20$:
$$\begin{array}{rcll}\mathbb{P}\left[{S}_{n+1}=k+1|{S}_{n}=k\right]& =& 1\u22153& \text{}\\ \mathbb{P}\left[{S}_{n+1}=k-1|{S}_{n}=k\right]& =& 2\u22153.& \text{}\end{array}$$
We then reﬂect the upward bias at price levels below $20 by requiring that for $k<20$:
$$\begin{array}{rcll}\mathbb{P}\left[{S}_{n+1}=k+1|{S}_{n}=k\right]& =& 2\u22153& \text{}\\ \mathbb{P}\left[{S}_{n+1}=k-1|{S}_{n}=k\right]& =& 1\u22153& \text{}\end{array}$$
Using the methods of “single-step analysis” calculate the expected time for the stock to fall from $25 through the support level all the way down to $18. (Because of the varying parameters there is no way to solve this problem using formulas. Instead you will have to go back to basic principles of single-step or ﬁrst-step analysis to solve the problem.)
__________________________________________________________________________
[1] William Feller. An Introduction to Probability Theory and Its Applications, Volume I, volume I. John Wiley and Sons, third edition, 1973. QA 273 F3712.
[2] S. Karlin and H. Taylor. A Second Course in Stochastic Processes. Academic Press, 1981.
[3] J. Michael Steele. Stochastic Calculus and Financial Applications. Springer-Verlag, 2001. QA 274.2 S 74.
__________________________________________________________________________
__________________________________________________________________________
I check all the information on each page for correctness and typographical errors. Nevertheless, some errors may occur and I would be grateful if you would alert me to such errors. I make every reasonable eﬀort to present current and accurate information for public use, however I do not guarantee the accuracy or timeliness of information on this website. Your use of the information from this website is strictly voluntary and at your risk.
I have checked the links to external sites for usefulness. Links to external websites are provided as a convenience. I do not endorse, control, monitor, or guarantee the information contained in any external website. I don’t guarantee that the links are active at all times. Use the links here with the same caution as you would all information on the Internet. This website reﬂects the thoughts, interests and opinions of its author. They do not explicitly represent oﬃcial positions or policies of my employer.
Information on this website is subject to change without notice.
Steve Dunbar’s Home Page, http://www.math.unl.edu/~sdunbar1
Email to Steve Dunbar, sdunbar1 at unl dot edu
Last modiﬁed: Processed from LATEX source on September 28, 2017