Pólya urn model (source code)

= Pólya urn model
{c}
{title2=$X_n=B_n/(B_n+R_n),\qquad\mathbb E[X_{n+1}\mid\mathcal F_n]=X_n$}
{wiki}

= Pólya urn
{c}
{synonym}

Begin with positive counts of two colours. At each step select one ball uniformly and replace it together with one new ball of its colour. If the total initial count is $m$, the blue proportion satisfies $X_{n+1}-X_n=(I_{n+1}-X_n)/(m+n+1)$, where the next blue indicator has conditional mean $X_n$. Thus $X_n$ is a bounded <martingale> and converges almost surely and in $L^2$ to a random proportion. If uniforms generate the draws, the update from time $n$ to $n+1$ must use the fresh $U_{n+1}$ relative to $\mathcal F_n=\sigma(U_1,\ldots,U_n)$.