Introduction and Motivation

The Pólya urn model, introduced by George Pólya and F. Eggenberger (1923), is a classic stochastic process modeling positive reinforcement, contagion, and path-dependent dynamics. Unlike sampling with replacement (which produces independent and identically distributed trials) or sampling without replacement (which depletes the pool), the Pólya scheme adds a ball of the drawn color back into the urn.
This feedback mechanism makes subsequent draws dependent on the entire past history. Despite this reinforcement, the sequence of relative proportions constitutes a bounded discrete-time martingale. Consequently, Doob's Forward Convergence Theorem applies, guaranteeing almost sure convergence to a limiting random variable whose distribution turns out to be continuous Uniform(0, 1).

1. Model Formulation and Setup

At time
n=0
, the urn contains 1 black ball and 1 white ball. At each discrete time step
n>=1
, one ball is drawn uniformly at random, inspected, and returned together with an additional ball of the same color. Let
X
n
be the indicator that the drawn ball is black (1) or white (0):
X
n

1
ifdrawnballisblack
0
ifdrawnballiswhite
The total number of black balls added to the urn by step
n
is denoted by
B
n
:
B
n

n
∑
i=1
X
i
,
B
0
0
At the end of period
n
, the urn holds
n+2
balls in total, exactly
B
n
+1
of which are black. The proportion of black balls at time
n
is defined by:
M
n

B
n
+1
n+2

2. Martingale Property

Let
ℱ
0
=={∅,Ω}
and define the natural filtration as
ℱ
n
=σ(
X
1
,
X
2
,…,
X
n
)
for
n>=1
.
Integrability and Adaptability: Since
0<=
B
n
<=n
, we have
0<
M
n
<1
almost surely for every
n>=0
. Thus,
[
M
n
]<∞
. Furthermore,
M
n
is a measurable function of
B
n
, making it strictly
ℱ
n
-adapted.
Notice that
B
n+1
=
B
n
+
X
n+1
. Given the history up to time
n
, the probability of drawing a black ball at step
n+1
is precisely the current proportion of black balls:
(
X
n+1
1
ℱ
n
)
M
n

B
n
+1
n+2
Now computing the conditional expectation of
M
n+1
:
[
M
n+1

ℱ
n
]
B
n+1
+1
n+3

ℱ
n

1
n+3
(
B
n
+1+[
X
n+1

ℱ
n
])
1
n+3
B
n
+1+
B
n
+1
n+2

B
n
+1
n+3
n+3
n+2

B
n
+1
n+2

M
n
Hence,
(
M
n
,
ℱ
n
)
is a martingale.

3. Probability of
k
Black Followed by
j
White Draws

Let
k>=1
and
j>=1
be positive integers. Consider the specific event
A=
X
1
=1,…,
X
k
=1,
X
k+1
=0,…,
X
k+j
=0
. By the conditional probabilities:
(A)
1
2
×
2
3
×⋯×
k
k+1
×
1
k+2
×
2
k+3
×⋯×
j
k+j+1
Factoring the terms in the numerator and denominator:
(A)
k!j!
(k+j+1)!

1
(k+j+1)
k+j
k

4. Distribution of
B
n
and Limiting Law

Any arbitrary binary sequence containing exactly
k
black balls and
n-k
white balls produces the same numerator product
k!(n-k)!
and denominator product
(n+1)!
. Consequently, every path with
k
black balls has equal probability:
(
X
1

x
1
,…,
X
n

x
n
)
k!(n-k)!
(n+1)!
,with
n
∑
i=1
x
i
=k
Since there are

n
k

such disjoint sequences:
(
B
n
k)
n
k

k!(n-k)!
(n+1)!

n!
k!(n-k)!
k!(n-k)!
(n+1)!

1
n+1
for every integer
0<=k<=n
. Therefore,
B
n
is uniformly distributed on {0, 1, ..., n}.
Because
M
n
is a martingale uniformly bounded in [0, 1], Doob's Martingale Convergence Theorem implies that
M
n
converges almost surely to a random variable
M
∞
. For any fixed
x
in (0, 1), the cumulative distribution function is:
F
n
(x)(
M
n
≤x)(
B
n
≤x(n+2)-1)
⌊x(n+2)-1⌋+1
n+1
Taking the limit as
n->∞
:
lim
n∞
F
n
(x)
lim
n∞
x(n+2)
n+1
x
Since
F(x)=x
on [0, 1], the sequence converges in distribution to a standard continuous uniform random variable:
M
n
⟹Uniform(0,1)

Simulation

Out[]=

CITE THIS NOTEBOOK

Pólya's urn: Martingales and limiting distribution​
by Diego Ramos​
Wolfram Community, STAFF PICKS, October 2, 2026
​https://community.wolfram.com/t/28231