Skip to content

Sum of Two IID Uniform Variables

Proposition

If X,YX,Y are independent Unif⁡(0,1)\operatorname{Unif}(0,1) variables, then S=X+YS=X+Y has density

fS(s)={s,0<s≤1,2−s,1<s<2,0,otherwise.f_S(s)=\begin{cases}s,&0<s\le1,\\2-s,&1<s<2,\\0,&\text{otherwise}.\end{cases}

The density peaks at s=1s=1.

Each Uniform Distribution on (0,1)(0,1) has density one there. The Convolution of Independent Random Variables integral reduces to the length of the overlap between (0,1)(0,1) and (s−1,s)(s-1,s), producing ss for 0<s≤10<s\le1 and 2−s2-s for 1<s<21<s<2.


Interpretation

Two independent uniform values have more ways to add up near the centre than near either endpoint. Their sum therefore has a triangular density on (0,2)(0,2) with its peak at 11.

The triangular density of the sum of two independent uniforms on 0 to 1, peaking at 1, divided into regions with probabilities 1/8, 3/4 and 1/8.

The red triangle on (0,1/2](0,1/2] has base 1/21/2 and height 1/21/2, so P(S≤1/2)=1/8\mathbb{P}(S\le1/2)=1/8; by symmetry the right tail has the same probability, and the middle part from 1/21/2 to 3/23/2 carries the remaining 3/43/4, as in the Examples.

Move ss: fS(s)f_S(s) is the length of the overlap of (0,1)(0,1) and (s−1,s)(s-1,s), which grows to 11 at s=1s=1 and then shrinks.

The result can also be read in the unit square, where the pair (X,Y)(X,Y) is uniform. The event {S≤s}\{S\le s\} is the part of the square below the line x+y=sx+y=s; for 0<s≤10<s\le1 it is a triangle of area s2/2s^2/2, which is the CDF, and its derivative ss is the density. The density is symmetric about 11 because (1−X)+(1−Y)=2−S(1-X)+(1-Y)=2-S has the same distribution as SS. Mean and variance follow without the density: ES=1/2+1/2=1\mathbb{E}S=1/2+1/2=1, and by independence Var⁡(S)=1/12+1/12=1/6\operatorname{Var}(S)=1/12+1/12=1/6.

This is the continuous counterpart of the triangular distribution of the sum of two dice, which peaks at 77. Adding more independent uniforms makes the shape smoother and more bell-shaped, an effect that returns later as the central limit theorem.

The sum of two uniforms is not uniform on (0,2)(0,2): that would give P(S≤1/2)=1/4\mathbb{P}(S\le1/2)=1/4, twice the correct value 1/81/8.


Key Results

  • E(X+Y)=1\mathbb{E}(X+Y)=1 and Var⁡(X+Y)=1/6\operatorname{Var}(X+Y)=1/6.
  • The CDF is s2/2s^2/2 on 0<s≤10<s\le1 and 1−(2−s)2/21-(2-s)^2/2 on 1<s<21<s<2.

Examples

  • P(X+Y≤1/2)=(1/2)2/2=1/8\mathbb{P}(X+Y\le1/2)=(1/2)^2/2=1/8.
  • P(1/2<X+Y<3/2)=1−1/8−1/8=3/4\mathbb{P}(1/2<X+Y<3/2)=1-1/8-1/8=3/4.

Prerequisites

Sources

Keywords: triangular distribution

Last updated: 20 October 2026 03:02