STA03B3 Lecture 2
STA03B3 Lecture 2
STOCHASTIC PROCESSES
Lecture 2
Dr V. van Appel
Department of Statistics
Faculty of Science, University of Johannesburg
1 / 16
Overview
A Review of Probability
1.4 Conditional Probability (Self Study)
1.5 Conditional Expectation (Self Study)
2 / 16
1.3 Monte Carlo Simulation
3 / 16
▶ Monte Carlo simulation is intuitive and matches up with our sense
of how probabilities should behave.
▶ The relative frequency interpretation of probability says that the
probability of an event is the long-term proportion of times that the
event occurs in repeated trials.
▶ It is justified theoretically by the strong law of large numbers.
▶ Consider repeated independent trials of a random experiment.
▶ Define the sequence X1 , X2 , · · · , where
1, if A occurs on the kth trial,
Xk =
0, if A does not occur on the kth trial,
for k ≥ 1.
4 / 16
▶ Then, (X1 + · · · + Xn )/n is the proportion of trials in which A
occurs. The Xk are identically distributed with common mean
E(Xk ) = P (A).
▶ By the strong law of large numbers,
X1 + · · · + Xn
lim = P (A). (1)
n→∞ n
X1 + · · · + Xn
P (A) ≈ .
n
5 / 16
1.4 Conditional Probability
Self study!
6 / 16
1.5 Conditional Expectation
Self study!
7 / 16
Example (1.10 Gambler’s ruin)
8 / 16
Solution
▶ We make two observations, which are made more precise in later
chapters.
▶ First, the gambler will eventually stop playing, either by
reaching n or by reaching 0.
▶ One might argue that the gambler could play forever.
▶ However, it can be shown that that event occurs with
probability 0.
▶ Second, assume that after, say, 100 wagers, the gambler’s
capital returns to $k.
▶ Then, the probability of eventually winning $n is the same as
it was initially.
▶ The memoryless character of the process means that the
probability of winning $n or losing all his money only depends
on how much capital the gambler has, and not on how many
previous wagers the gambler made.
9 / 16
Solution Cont.
▶ Let pk denote the probability of reaching n when the gambler’s
fortune is k.
▶ What is the gambler’s status if heads is tossed? Their fortune
increases to k + 1 and the probability of winning is the same as it
would be if the gambler had started the game with k + 1. If a
gambler wins one dollar in the first game, then their wealth
becomes k + 1.
▶ Similarly, if tails is tossed and the gambler’s fortune decreases to
k − 1. In other words, if they lost one dollar in the first game, their
fortune becomes k − 1.
▶ We can use elementary algebra to aggregate these equations into a
standardized format that can be simplified into a single formula.
10 / 16
Solution Cont.
▶ Assume a fair game, where p = 1/2.
▶ Hence,
1 1
pk = pk+1 + pk−1 ,
2 2
or
11 / 16
Solution Cont.
▶ Unwinding the recurrence gives
for k = 1, . . . , n.
▶ We have that p2 − p1 = p1 , giving p2 = 2p1 .
▶ Also, p3 − p2 = p3 − 2p1 = p1 , giving p3 = 3p1 .
▶ More generally, pk = kp1 , for k = 1, . . . , n.
12 / 16
Solution Cont.
▶ Sum Equation (2) over suitable k to obtain
n−1
X n−1
X
(pk+1 − pk ) = (pk − pk−1 ) .
k=1 k=1
pn − p1 = pn−1 − p0 ,
which gives
Thus,
k
pk = kp1 = , for k = 0, · · · , n.
n
13 / 16
Solution Cont.
▶ The probability that the gambler eventually wins $n is k/n.
14 / 16
References I
15 / 16
Questions?
16 / 16