# A simple generlisation of Pólya urn

There is an urn with $n$ balls, each one of them is black or white. On the $i$-th stage we draw one random ball from the urn. If it is black we return it to the urn with $X_i$ black balls. Otherwise we return it with $Y_i$ white balls. Let $B_i$ and $W_i$ be the number of black and white balls on the $i$-th stage and $M_{i}=\frac{B_{i}}{B_{i}+W_{i}}$.

I need to check that if $X_i$ and $Y_i$ are independent and identically distributed then $M_i$ is a martingale with respect to its natural filtration. And I have no idea how to do that. Could you help?

First of all notice that $M_{i}$ is the probability of picking a black ball from the urn. Then:

$E\left[M_{i+1}\mid\forall j\leq i,M_{j}=m_{j}\right]=$

$=E\left[M_{i+1}\mid\forall j\leq i,M_{j}=m_{j},i\mbox{-th ball is black}\right]m_{i}+E\left[M_{i+1}\mid\forall j\leq i,M_{j}=m_{j},i\mbox{-th ball is black}\right]\left(1-m_{i}\right)=$

$=E\left[\frac{B_{i+1}+X_{i+1}}{B_{i+1}+W_{i+1}+X_{i+1}}\mid\forall j\leq i,M_{j}=m_{j}\right]m_{i}+E\left[\frac{B_{i+1}+X_{i+1}}{B_{i+1}+W_{i+1}+X_{i+1}}\mid\forall j\leq i,M_{j}=m_{j}\right]\left(1-m_{i}\right)$

Also:

$1-M_{i}=\frac{W_{i}}{B_{i}+W_{i}}\Rightarrow\frac{B_{i}}{B_{i}+W_{i}}\frac{W_{i}}{B_{i}+W_{i}+Y_{i+1}}=M_{i}\left(1-\frac{B_{i}+Y_{i+1}}{B_{i}+W_{i}+Y_{i+1}}\right)$

Using the fact that $X_{i}$ and $Y_{i}$ are identically distributed and independent and hence using the previous equity we deduce:

$E\left[M_{i+1}\mid\forall j\leq i,M_{j}=m_{j}\right]=$

$=E\left[\frac{B_{i+1}+X_{i+1}}{B_{i+1}+W_{i+1}+X_{i+1}}\mid\forall j\leq i,M_{j}=m_{j}\right]m_{i}+m_{i}-E\left[\frac{B_{i+1}+Y_{i+1}}{B_{i+1}+W_{i+1}+Y_{i+1}}\mid\forall j\leq i,M_{j}=m_{j}\right]m_{i}= m_{i}$

Hence $M_{i}$ is indeed a martingale.

Now, applying the fact that every stochastic process is adopted to its natural filtration, $M_{i}$ is a martingale adopted to its natural filtration.