From Uniform Summands to an Irwin–Hall Law
Let \(X_1,\ldots,X_n\) be independent random variables, each uniformly distributed on the unit interval, and write \(S_n=X_1+\cdots+X_n\). The sum is supported on \([0,n]\), but its density changes form at the integers: as the sum grows, more of the unit cube contributes to the event that the total is below a given value. The resulting distribution is called the Irwin–Hall distribution.
There are two useful ways to identify this law. Independence gives a compact characteristic function, while geometric volume and inclusion–exclusion give an explicit cumulative distribution function and density. The latter formulas also make the polynomial pieces visible.
Characteristic Function
For a random variable \(X\), its characteristic function is \(\varphi_X(t)=E[e^{itX}]\), for real \(t\). For one unit-uniform variable, direct integration gives
The value at zero is also the continuous limit of the expression for \(t\ne 0\). Rewriting the numerator in terms of sine gives an equivalent form. Since the summands are independent, the characteristic function of their sum is the product of their characteristic functions.
The formula follows by integrating the uniform density and applying the product rule for characteristic functions of independent sums. The displayed sine form has a continuous value at \(t=0\), because \(\sin(t/2)/(t/2)\) tends to \(1\). Its phase factor \(e^{int/2}\) reflects that the sum is centered at \(n/2\).
Worked Example: The Characteristic Function for Four Summands
Suppose \(X_1,\ldots,X_4\) are independent Uniform\((0,1)\) variables. For one summand, \(\varphi_X(t)=e^{it/2}\sin(t/2)/(t/2)\), with value \(1\) at zero. Therefore
At \(t=0\), this expression equals \(1\), as a characteristic function must. The phase \(e^{2it}\) is consistent with \(E[S_4]=2\), since each summand has mean \(1/2\).
Cumulative Distribution Function by Volume
The joint density of \((X_1,\ldots,X_n)\) is \(1\) on the unit cube \([0,1]^n\) and zero elsewhere. Thus \(P(S_n\le x)\) is the volume of the part of that cube satisfying \(u_1+\cdots+u_n\le x\). Without the upper constraints \(u_j\le 1\), the nonnegative simplex with coordinate sum at most \(x\) has volume \(x^n/n!\) for \(x\ge 0\). The unit-cube constraints can be imposed by inclusion–exclusion.
Proof. Start with the region \(u_j\ge 0\) and \(\sum_{j=1}^n u_j\le x\). For \(x\ge 0\), its volume is \(x^n/n!\); for \(x<0\), it is empty. One way to verify the volume is induction on \(n\): the one-dimensional length is \(x\), and integrating the \((n-1)\)-dimensional volume over the last coordinate gives
For each coordinate, the cube requires excluding the event \(u_j>1\). Apply inclusion–exclusion to these \(n\) excluded events. Choose a subset of \(k\) coordinates required to exceed \(1\), and subtract \(1\) from each of those coordinates. This translation changes the sum constraint from \(\sum_j u_j\le x\) to a nonnegative-coordinate constraint with total at most \(x-k\). Its volume is \((x-k)_+^n/n!\). There are \({n\choose k}\) choices of the subset, and inclusion–exclusion assigns the sign \((-1)^k\). Summing over \(k=0,\ldots,n\) gives the stated CDF. For \(x\le 0\) every positive-part term is zero. For \(x\ge n\), the event \(S_n\le x\) has probability one because \(S_n\le n\); the formula agrees with this since it was obtained by calculating the cube volume. \(\square\)
The Piecewise-Polynomial Density
For \(n\ge 2\), differentiating the CDF gives a continuous density (with the usual value at individual endpoints understood by continuity). The derivative of \((x-k)_+^n\) is \(n(x-k)_+^{n-1}\), including at \(x=k\). Hence:
For \(n=1\), the CDF has a corner at \(x=0\) and \(x=1\), so its density is instead the Uniform\((0,1)\) density almost everywhere. The formula above is stated for \(n\ge2\) to avoid interpreting its exponent-zero positive-part terms at those boundary points.
Worked Example: Two Uniform Summands
For \(S_2=X_1+X_2\), the formula gives
For \(0<x<1\), only the first term contributes, so \(f_{S_2}(x)=x\). For \(1<x<2\), the first two terms contribute, giving \(f_{S_2}(x)=x-2(x-1)=2-x\). Outside \([0,2]\), the density is zero. Thus the density is triangular: it rises linearly to \(1\) at \(x=1\), then falls linearly to zero at \(x=2\).
As a probability check, for \(0\le x\le1\) the CDF is \(F_{S_2}(x)=x^2/2\). Therefore \(P(S_2\le 1/2)=(1/2)^2/2=1/8\). This also equals the area of a right triangle with base and height \(1/2\).
Worked Example: Three Uniform Summands
For \(S_3\), the density is
On the successive intervals, this becomes
For example, on \(1<x<2\), expanding the numerator gives \(x^2-3(x^2-2x+1)=-2x^2+6x-3\), so this piece is \(-x^2+3x-\tfrac32\). To check a probability using the CDF formula, at \(x=3/2\),
The value \(1/2\) is also expected from the symmetry of the sum about \(3/2\).
Worked Example: Four Uniform Summands
For \(S_4\), the density formula is
On \(0<x<1\), this is \(x^3/6\). On \(1<x<2\), it is \([x^3-4(x-1)^3]/6\). For \(2<x<3\), the third term must also be included, giving \([x^3-4(x-1)^3+6(x-2)^3]/6\). On \(3<x<4\), the expression simplifies to \((4-x)^3/6\).
The CDF formula has denominator \(4!=24\). At \(x=1\), \(F_{S_4}(1)=1/24\). At \(x=2\),
Consequently, \(P(1<S_4\le2)=1/2-1/24=11/24\). Endpoints have probability zero because \(S_4\) has a density.
Checks, Symmetry, and a Common Pitfall
Each summand has mean \(1/2\) and variance \(1/12\). Independence therefore gives \(E[S_n]=n/2\) and \(\operatorname{Var}(S_n)=n/12\). These values provide simple checks on the scale and center of a derived law. There is also an exact symmetry: if \(X_j\) is Uniform\((0,1)\), then \(1-X_j\) has the same distribution. Independence is preserved by applying this transformation coordinatewise, so \(n-S_n=\sum_j(1-X_j)\) has the same distribution as \(S_n\). In particular, the density is symmetric about \(n/2\), and, because the distribution is continuous, \(F_{S_n}(n/2)=1/2\).
A common mistake is to use the simplex expression \(x^n/n!\) as the CDF numerator for every \(x\), then differentiate to claim the density is \(x^{n-1}/(n-1)!\) throughout the support. That expression counts the nonnegative simplex but ignores the restrictions \(u_j\le1\). For \(x>1\), parts of that simplex lie outside the unit cube and must be removed. Inclusion–exclusion supplies the correction terms \((-1)^k{n\choose k}(x-k)_+^n\); omitting them can even produce a density that increases beyond the center, contradicting the symmetry of the sum.
Check Your Understanding
Use the formulas and symmetry developed above to answer these questions.
- Write the characteristic function of a sum of five independent Uniform\((0,1)\) variables, including its value at zero.
- For two independent unit-uniform variables, calculate \(P(S_2\le 3/2)\) from the CDF or density.
- Write the density of \(S_3\) on the interval \(0<x<1\) and on \(1<x<2\).
- Explain why the simplex volume \(x^n/n!\) alone does not give \(F_{S_n}(x)\) when \(x>1\).
- What are \(E[S_n]\) and \(\operatorname{Var}(S_n)\), and what symmetry does the density have?