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, ..., n1n-1. Define random variables as below.

X1DU(0,n)X_1 \sim DU(0, n)

Xi+1DU(0,Xi) for i1X_{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(TnX1))=i=0n11nE(TnX1=i)=i=0n11n(1+E(Ti))=i=0n11n(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=0n1tint_n = n + \sum_{i=0}^{n-1} t_i
(n1)tn1=(n1)+i=0n2ti(n-1)t_{n-1} = (n-1) + \sum_{i=0}^{n-2} t_i
ntn=n+tn1+(n1)tn1(n1)=ntn1+1nt_n = n + t_{n-1} + (n-1)t_{n-1} - (n-1) = nt_{n-1} + 1
tntn1=1nt_n - t_{n-1} = \frac{1}{n}
i=1n(titi1)=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}