Probability the Sum of Uniforms Stays Below One

Probability · Medium · Free problem

Let $X_1, X_2, \dots$ be independent and identically distributed Uniform$(0,1)$ random variables, and write $S_n = X_1 + \cdots + X_n$.

(a) For a fixed integer $n$, what is the probability that the first $n$ of them sum to less than $1$, i.e. $P(S_n < 1)$?

(b) More generally, find $P(S_n < x)$ for $0 \le x \le 1$, and use it to compute $P(X_1 + X_2 + X_3 < 1/2)$.

(c) Let $N = \min\{n : S_n > 1\}$ be the number of uniforms you must draw before the running sum first exceeds $1$. Find $E[N]$.

Hints

  1. Interpret the probability as a volume inside the unit cube $[0,1]^n$.
  2. Work out $n = 1, 2, 3$ explicitly (1, then a triangle of area $1/2$, then a tetrahedron of volume $1/6$) and look for the pattern.
  3. The region is a simplex; its volume is $1/n!$, provable by induction on $n$.
  4. For (b), prove the stronger $P(S_n < x) = x^n/n!$ by conditioning on the last variable. For (c), note $N > n$ exactly when $S_n \le 1$, then use $E[N] = \sum_{n \ge 0} P(N > n)$.

Worked Solution

How to Think About It: The event $\{X_1 + \cdots + X_n < 1\}$ is the part of the unit cube $[0,1]^n$ that lies under the plane $x_1 + \cdots + x_n = 1$. That region is a simplex, and its volume is the probability you want. Compute a small case to guess the pattern, then prove it by induction with a general threshold $x$ in place of $1$. The tail probabilities $P(N > n)$ in (c) are exactly these simplex volumes.

Quick Estimate: For $n = 1$, $P(X_1 < 1) = 1$. For $n = 2$, the region is the triangle below the line $x_1 + x_2 = 1$, with area $1/2$. For $n = 3$ it is a tetrahedron of volume $1/6$. The pattern is $1/n!$.

Formal Solution:

*Step 1 -- Strengthen the claim.* Let $F_n(x) = P(S_n < x)$. Claim: for $0 \le x \le 1$, $$F_n(x) = \frac{x^n}{n!}.$$ Carrying the general threshold $x$ along is what makes the induction work.

*Step 2 -- Base case.* $F_1(x) = P(X_1 < x) = x$.

*Step 3 -- Inductive step.* $X_{n+1}$ is uniform and independent of $S_n$, so for $x \in [0, 1]$, $$F_{n+1}(x) = \int_0^1 P(S_n < x - t)\,dt = \int_0^x \frac{(x - t)^n}{n!}\,dt = \frac{x^{n+1}}{(n+1)!},$$ where the integrand vanishes for $t > x$ because $S_n \ge 0$.

*Step 4 -- Part (a).* Setting $x = 1$, $$P\!\left(\sum_{i=1}^n X_i < 1\right) = \frac{1}{n!}.$$ Geometrically this is the volume of the corner simplex $\{x_i \ge 0,\ \sum x_i < 1\}$ inside the unit cube (the density is $1$ there). The map $y_k = x_1 + \cdots + x_k$ has a unit-triangular Jacobian, so it preserves volume, and it sends the simplex onto $\{0 \le y_1 \le \cdots \le y_n \le 1\}$, one of the $n!$ congruent ordering regions that partition the cube. Hence the volume is $1/n!$.

*Step 5 -- Part (b).* $P(S_n < x) = x^n/n!$ for $0 \le x \le 1$. With $n = 3$ and $x = 1/2$: $$P\!\left(X_1 + X_2 + X_3 < \tfrac12\right) = \frac{(1/2)^3}{3!} = \frac{1}{48} \approx 0.0208.$$ The simplex scales with $x$ in every one of the $n$ directions, which is where the $x^n$ comes from.

*Step 6 -- Part (c).* $N > n$ exactly when $S_n \le 1$, so $P(N > n) = 1/n!$ for $n \ge 0$ (with $P(N > 0) = 1$). By the tail-sum formula, $$E[N] = \sum_{n \ge 0} P(N > n) = \sum_{n \ge 0} \frac{1}{n!} = e \approx 2.718.$$ A simulation of one million runs gives $E[N] \approx 2.718$.

Answer: (a) $\dfrac{1}{n!}$. (b) $P(S_n < x) = \dfrac{x^n}{n!}$, so $P(X_1 + X_2 + X_3 < 1/2) = \dfrac{1}{48}$. (c) $E[N] = e \approx 2.718$.

Intuition

This is the cleanest example of turning a probability into a geometric volume. The factorial decay $1/n!$ is striking: adding more uniforms makes it exponentially unlikely the sum stays small, which is just the central-limit fact that the sum concentrates around its mean $n/2$.

The same simplex-volume idea reappears in order statistics, Dirichlet distributions, and the classic 'expected number of uniforms summing past 1 is $e$' puzzle of part (c) (the probability you need more than $n$ terms is $1/n!$, and summing gives $e$). Recognizing probability-as-volume is a reusable move for any uniform-on-a-box question.

Open the full interactive solver →