# Stochastic processes: martingales

1. Nov 17, 2008

### dirk_mec1

Last edited by a moderator: May 3, 2017
2. Nov 17, 2008

Let $$Y_{n}$$ be the gambler's winnings after n games. Clearly, $$Y_{n}$$ is a martingale. We introduce a new stochastic process $$Z_{n}$$, where $$Z_{n}={Y_{n}}^2-n$$. It can be shown that $$Z_{n}$$ is a martingale with respect to $$Y_{n}$$. (Can you try to show this?)
Let N be the random variable for the step where the gambler's winnings first reach A or -B. Then, we have $$E(Z_{N})=E({Y_{N}}^2)-E(N)$$. By applying the Martingale Stopping Theorem (first check the necessary conditions are satisfied), we can show $$E(Z_{N})=0$$.
This leaves us with $$E(N)=E({Y_{N}}^2)$$. To determine $$E({Y_{N}}^2)$$, use the definition of expectation, and observe that $$Y_{N}$$ can only take the values A or -B. To calculate the relevant probabilities, apply some formulae related to stopping times of Markov Chains (with stationary transition probabilities). We are now able to compute $$E({Y_{N}}^2)$$, which will be equal to $$E(N)$$.