The number $e$ approximated as sums of of $X \sim U(0,1)$. Why does it work?

223 Views Asked by At

In this post a computer simulation to approximate $e$ is based on the mathematical knowledge that $E[\xi]=e$, where $\xi$ is the random variable defined as the minimum number of $n$ such that $\sum_{i=1}^n r_i>1$ and $r_i$ are random numbers from uniform distribution $X \sim [0,1]$.

It clearly works, but I am curious to know if this fact has a name, and if it has a mathematical proof.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $R_1, R_2, \ldots$ be independent uniform $[0,1]$ variables and define $N$ to be the minimum number of these uniforms needed to achieve a sum exceeding $1$. The event $\{N>n\}$ is the same as the event $\{R_1 + \cdots + R_n\le 1\}$, which has probability $\frac1{n!}$. The calculation is complete with the identity $$E(N)=\sum_{n=1}^\infty P(N\ge n)=\sum_{n=0}^\infty P(N>n).$$