# Sum of iid random variables uniformly distributed in [0,1]

Let $U_1,U_2,...,U_n$ be independent random variables that are uniformly distributed in $[0,1]$. Let $N=min$ {$k |U_1+...+U_k>1$}. $(a)$ Let $a∈[0,1]$. Show that $P(U_1+···+U_n≤a)=\frac{a^n}{n!}$. $(b)$ Find $E[N]$ and $Var[N]$.

For $(a)$ I thought about finding the density with convolution; for the general case with $U_1,...,U_n$ I thought about induction. Another idea was to use the moment generating function, but that wasn't very clear to me. How can I approach this exercise? For $(b)$ I don't have any clue. Any help would be much appreciated, I'm not looking for the entire solution for you to give.

• I believe that (a) is significantly easier than what you're considering to do, but not sure. Try to do it for n=1, 2, or 3: It's just the length/area/volume of a pyramid. – fonini Nov 6 '17 at 10:26
• $N$ isn't well-defined if you have only finitely many $U_n$. – T.J. Gaffney Nov 6 '17 at 10:29

## 1 Answer

Hints (assuming you have an infnite sequence of $U_n$):

a) Using Induction is a good idea. For the inductive step, first calculate the density of $P(U_1 + \dots + U_n)$, and set $X := U_1 + \dots + U_n$. Calculate the density of $X + U_{n+1}$ by taking the convolution of the densities of these two random variables.

b) You have $$\mathbb{E}[N] = \sum_{n=0}^{\infty} P(N > n).$$ and we have $P(N>n) = P(U_1 + \dots + U_n \leq 1)$. Now use part (a).

c) Use $\mathbb{E}[(N-\mu)^2] = \mathbb{E}[N^2] - \mu^2$. Use $P(N=n) = P(N > n-1) - P(N>n+1)$ to calculate $\mathbb{E}[N^2]$.

• Why is $\mathbb E[N] = \sum_{n=0}^\infty P(N > n)$? Shouldn't this be $\mathbb E[N] = \sum_{n=0}^\infty nP(N=n)$? Unless these are in fact the same? – D Ford Dec 2 '18 at 5:38
• @DFord they are in fact the same for nonnegative random variables. To see this, write $$P(N > n) = \sum_{k=n+1}^{\infty} P(N = k)$$ and exchange the order of summation. – user159517 Dec 2 '18 at 10:28