Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Let DU(0,n)DU(0, n) be the discrete uniform distribution on 0, 1, ..., n−1n-1. Define random variables as below.

X1∼DU(0,n)X_1 \sim DU(0, n)

Xi+1∼DU(0,Xi) for i≥1X_{i+1} \sim DU(0, X_{i}) \ for \ i \ge 1

The above process is repeated until we get a random variable with the value zero. What is the expected number of variables (i.e., time to hit zero) in this process?

Let TnT_n be the time needed to hit zero.

tn=E(Tn)=E(E(Tn∣X1))=∑i=0n−11nE(Tn∣X1=i)=∑i=0n−11n(1+E(Ti))=∑i=0n−11n(1+ti)\begin{align*} t_n &=E(T_n) = E\left(E(T_n|X_1)\right) \\ &= \sum_{i=0}^{n-1} \frac{1}{n} E(T_n|X_1=i) \\ &= \sum_{i=0}^{n-1} \frac{1}{n} (1 + E(T_i)) \\ &= \sum_{i=0}^{n-1} \frac{1}{n} (1 + t_i) \end{align*}
ntn=n+∑i=0n−1tint_n = n + \sum_{i=0}^{n-1} t_i
(n−1)tn−1=(n−1)+∑i=0n−2ti(n-1)t_{n-1} = (n-1) + \sum_{i=0}^{n-2} t_i
ntn=n+tn−1+(n−1)tn−1−(n−1)=ntn−1+1nt_n = n + t_{n-1} + (n-1)t_{n-1} - (n-1) = nt_{n-1} + 1
tn−tn−1=1nt_n - t_{n-1} = \frac{1}{n}
∑i=1n(ti−ti−1)=∑i=1n1i\sum_{i=1}^n (t_i - t_{i-1}) = \sum_{i=1}^n \frac{1}{i}
t0=0t_0 = 0
tn=∑i=1n1it_n = \sum_{i=1}^n \frac{1}{i}