Tutorials › Statistical Theory I - Probability and Distribution Theory › Irwin-Hall Laws from Uniform Sums

Distribution Identification and Sums · Tutorial 578 of 994

Irwin-Hall Laws from Uniform Sums

Learn to identify a sum of independent unit-uniform variables, derive its density, and calculate its distribution on each polynomial piece.

Advanced 12 min read

What You'll Learn

  • Derive the characteristic function of a sum of independent Uniform(0,1) variables.
  • Obtain the Irwin–Hall cumulative distribution function using simplex volumes and inclusion–exclusion.
  • Differentiate the CDF to get the piecewise-polynomial density.
  • Work out the triangular density for two summands and the pieces for three and four.
  • Use symmetry and support to check calculations and avoid common formula errors.

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.

Definition: If \(X_1,\ldots,X_n\) are independent and each has the Uniform\((0,1)\) distribution, then \(S_n=\sum_{j=1}^n X_j\) has the Irwin–Hall distribution with parameter \(n\). Its support is \([0,n]\). For \(n=1\), its density is \(1\) on \((0,1)\) and \(0\) outside \([0,1]\); for \(n\ge 2\), its density is given by the formula derived below.

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

$$ \varphi_X(t)=\int_0^1 e^{itx}\,dx =\begin{cases} \dfrac{e^{it}-1}{it},&t\ne 0,\\[6pt] 1,&t=0. \end{cases} $$

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.

Result: The characteristic function of \(S_n\) is
$$ \varphi_{S_n}(t)= \left(\frac{e^{it}-1}{it}\right)^n =e^{int/2}\left(\frac{\sin(t/2)}{t/2}\right)^n,\qquad t\ne 0, $$
with \(\varphi_{S_n}(0)=1\).

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

$$ \varphi_{S_4}(t) =\left(e^{it/2}\frac{\sin(t/2)}{t/2}\right)^4 =e^{2it}\left(\frac{\sin(t/2)}{t/2}\right)^4. $$

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.

Theorem: For \(n\ge 1\), the cumulative distribution function of \(S_n\) is
$$ F_{S_n}(x)=\frac{1}{n!}\sum_{k=0}^{n}(-1)^k {n\choose k}(x-k)_+^n, \qquad (y)_+=\max(y,0). $$
This formula gives \(F_{S_n}(x)=0\) for \(x\le 0\) and \(F_{S_n}(x)=1\) for \(x\ge n\).

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

$$ \int_0^x \frac{(x-u)^{n-1}}{(n-1)!}\,du =\frac{x^n}{n!}. $$

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:

Density formula: For \(n\ge 2\),
$$ f_{S_n}(x)=\frac{1}{(n-1)!} \sum_{k=0}^{n}(-1)^k {n\choose k}(x-k)_+^{n-1}. $$
The density is zero outside \([0,n]\). Between consecutive integers, the set of nonzero terms is fixed, so the density is a polynomial of degree at most \(n-1\) on each such interval.

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

$$ f_{S_2}(x)=(x)_+-2(x-1)_++(x-2)_+. $$

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

$$ f_{S_3}(x)=\frac12\left\{(x)_+^2-3(x-1)_+^2+3(x-2)_+^2-(x-3)_+^2\right\}. $$

On the successive intervals, this becomes

$$ f_{S_3}(x)= \begin{cases} x^2/2,&0<x<1,\\ \bigl[x^2-3(x-1)^2\bigr]/2,&1<x<2,\\ (3-x)^2/2,&2<x<3,\\ 0,&x<0\text{ or }x>3. \end{cases} $$

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\),

$$ F_{S_3}(3/2) =\frac{(3/2)^3-3(1/2)^3}{6} =\frac{27/8-3/8}{6} =\frac12. $$

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

$$ f_{S_4}(x)=\frac16\left\{(x)_+^3-4(x-1)_+^3+6(x-2)_+^3-4(x-3)_+^3+(x-4)_+^3\right\}. $$

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\),

$$ F_{S_4}(2) =\frac{2^4-4(2-1)^4}{24} =\frac{16-4}{24} =\frac12. $$

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.

Key takeaway: The characteristic function identifies the sum compactly, while the CDF and density formulas expose its shape. In the piecewise-polynomial formula, each positive-part term accounts for a correction at an integer threshold; retaining those terms is essential.

Check Your Understanding

Use the formulas and symmetry developed above to answer these questions.

  1. Write the characteristic function of a sum of five independent Uniform\((0,1)\) variables, including its value at zero.
  2. For two independent unit-uniform variables, calculate \(P(S_2\le 3/2)\) from the CDF or density.
  3. Write the density of \(S_3\) on the interval \(0<x<1\) and on \(1<x<2\).
  4. Explain why the simplex volume \(x^n/n!\) alone does not give \(F_{S_n}(x)\) when \(x>1\).
  5. What are \(E[S_n]\) and \(\operatorname{Var}(S_n)\), and what symmetry does the density have?