Expected number of uniform variates generated

55 Views Asked by At

Suppose there is a sequence of iid variates from $U(0,1)$, $X_1,X_2,\dots$ If we stop the process when $X_n>X_{n+1}$, what is the expected number of generated variates?

I am just thinking about treating it as a Bernoulli process, so that I can use geometric distribution. Is this the right approach?

2

There are 2 best solutions below

0
On

Consider the $n$-polytope (where $n$ is the number of generated $U(0,1)$ variates) $S_n$ whose interior consists of all points $(x_1,\dots,x_n)$ with $0\le x_1\le\dots\le x_n<1$. The hypervolume of this polytope is easily seen to be $\frac1{n!}$.

The ratio of the numeric hypervolume of $S_{n+1}$ to $S_n$ gives the probability that the process does not stop at $n+1$ variates given that it does not stop at $n$ variates. (This is true because $S_n$ is extruded into a prism when comparing hypervolume with $S_{n+1}$, but the height of that prism is 1.) This ratio is $\frac1{n+1}$; its complement, $\frac n{n+1}$, gives the probability for a process that has generated $n$ variates to stop on the next generation.

Thus the probability that $n$ variates are generated, with $n\ge2$, is $\frac{n-1}{n!}$. (For the requisite comparison to be made, at least two variates are needed.) The expected number of generated variates is thus $$\sum_{n=2}^\infty\frac{n(n-1)}{n!}=e$$ I have run a computer simulation to verify this result.

0
On

The result of Parcly Taxel is right. Below is my answer.

Let $P_{n+1}$ be the probability of n+1 variables generated. Then consider the joint distribution $X_1, X_2, \ldots , X_{n+1}$ which is a Uniform Distribution. $$P_{n+1} = \int_0^1 \int_0^{x_1}\ldots\int_0^{x_n-1}\int_{x_n}^1dx_{n+1}d_{x_n}\ldots dx_1 = \frac{1}{n!}-\frac{1}{(n+1)!}$$

The above can be calculated easily and the expected number is $$\sum_{n=1}^\infty P_{n+1}(n+1) = \sum_{n=0}^\infty \frac{1}{n!} = e$$

Using Poisson Distribution($P_\lambda (k) = e^{-\lambda}\frac{\lambda^k}{k!}$) with parameter $\lambda = 1$.