# What is the expectation of the following random variable

Let $X_1,X_2,X_3,\ldots$ be an i.i.d. sequence of uniform random variables over $[0,1]$. Define $$N= \min \{n \geq 1:X_1+\cdots+X_n>1\}$$ Find $P\{N>n\}$ and compute $E[N]$.

• You seem to be using $n$ to mean two different things. Also, $N$ (under the assumptions and conditions given) is not well-defined. Please make certain that you've correctly copied everything down. Also, please share your thoughts and efforts on the problem so far, as it will help us tailor our answers to your needs. – Cameron Buie Nov 18 '13 at 19:33
• I think something like this is meant:We have a sequence $X_1,X_2,...,X_i,X_{i+1},...$, now $N$ is the least indice such that $X_1+X_2+...+X_N$ exceeds one. Depending on the values of $X_i$s $N$ can be be different each time. – hhsaffar Nov 18 '13 at 19:40
• The question was copied correctly as stated. I guess the author has an error. I changed it to reflect what appears to be the correct statement. Right now I'm thinking the sum of iid uniform r.v. is a uniform r.v. but I'm stuck there. – Wintermute Nov 18 '13 at 19:48
• A sum of iid uniform r.v. is not a uniform r.v. anymore, the distribution is giving by the Irwin-Hall formula. – Raskolnikov Nov 18 '13 at 19:52
• Unfortunately, $N$ is still not well-defined. It is possible (though of probability $0$) that $X_n=0$ for all $n,$ and no matter how many $0$s we add up, the sum will not exceed $1$. – Cameron Buie Nov 18 '13 at 20:50

$S_n=X_1+...+X_n \\ P(S_n \leq t),t<n=\text{The volume between the axises and the hyperplane X_1+X_2+...+X_n=t which is } \frac{t^n}{n!} \\ P(S_n \leq t)=\frac{t^n}{n!},t<n\\ f_{S_n}(t)=\frac{t^{n-1}}{(n-1)!},t<n \\ P(N=n)=\int\limits_0^1f_{S_{n-1}}(t)P(X_n>1-t)dt=\int\limits_0^1\frac{t^{n-2}}{(n-2)!}t dt=\frac{1}{n(n-2)!},n\geq2$
• I lost you at $P(N=n)$. I wanted $P(N>n)$. I also fail to see how you incorporated that fact that $N$ is defined in terms of a minimum – Wintermute Nov 18 '13 at 21:20
• $P(N=n) = P(S_{n-1}<1 \land S_{n}>1)$ this means that $\int\limits_{0}^{1}f(S_{n-1}=t \land X_n>1-t)dt$ – hhsaffar Nov 18 '13 at 21:29
$P\left[N>n\right]=P\left[S_{n}\leq1\right]=\frac{1}{n!}$ and $E\left[N\right]=\sum_{n=1}^{\infty}P\left\{ N\geq n\right\} =\sum_{n=0}^{\infty}P\left\{ N>n\right\} =\sum_{n=0}^{\infty}\frac{1}{n!}=e$