Why Different Uniform Intervals Change the Shape
The sum of two independent uniform variables has a density determined by how much their possible values can overlap at each proposed total. When the variables have different interval lengths, this overlap may grow, remain constant for a while, and then shrink. The resulting density is generally a trapezoid rather than the triangle that occurs when the interval lengths are equal.
The key is to track the overlap carefully. The support gives the smallest and largest possible sums, while the overlap changes at sums of interval endpoints. Identifying those breakpoints before integrating prevents a common error: assuming the density peaks at one point even when it should have a plateau.
Convolution as an Overlap Length
The density of \(X\) is \(1/m\) on \([a,b]\) and zero elsewhere; the density of \(Y\) is \(1/n\) on \([c,d]\) and zero elsewhere. Independence gives the convolution formula
For a fixed total \(s\), both density factors are nonzero only when \(a\le x\le b\) and \(c\le s-x\le d\). The second pair of inequalities is equivalent to \(s-d\le x\le s-c\). Thus the integral is the length of the intersection of \([a,b]\) and \([s-d,s-c]\), divided by \(mn\):
This overlap formula also explains the shape. As \(s\) increases from the smallest possible total, the overlap grows linearly. Once the shorter interval lies fully inside the longer one, the overlap stays at the shorter interval’s length. It then shrinks linearly as the intervals separate.
If \(m=n\), the middle interval has zero length, so there is no positive-width plateau; the density rises to a single peak and then falls. If \(m\ne n\), the plateau has width \(|m-n|\). Values assigned to the density at individual breakpoints do not affect probabilities, since a continuous random variable has zero probability at any one point.
Why the Piecewise Formula Holds
A short derivation from the overlap gives the formula and shows how to locate its pieces. Let \(t=s-L\), the distance of \(s\) above the smallest possible total. The overlap length is zero for \(t<0\). For \(t\ge 0\), it increases until the shorter interval is fully inside the longer one; that occurs at \(t=\min(m,n)\). The maximum overlap is \(\min(m,n)\), so the density on the plateau is \(\min(m,n)/(mn)=1/\max(m,n)\).
After the plateau, the overlap decreases to zero at \(t=m+n\), which corresponds to \(s=L+m+n=U\). In this final section its length is \(m+n-t=U-s\). Before the plateau its length is \(t=s-L\). Dividing each overlap length by \(mn\), the product of the two constant density heights, gives the rising and falling pieces. These three overlap lengths, \(s-L\), \(\min(m,n)\), and \(U-s\), establish the stated density.
Add the lower endpoints to get \(L=a+c\), and add the upper endpoints to get \(U=b+d\).
Set \(m=b-a\) and \(n=d-c\). The interior breakpoints are \(L+\min(m,n)\) and \(L+\max(m,n)\).
Use the rising, constant, and falling formulas on their respective intervals. If calculating a probability, split the integral wherever its limits cross a breakpoint.
Worked Densities and Probabilities
Worked Example: A Plateau Between Unequal Intervals
Suppose \(X\sim\operatorname{Unif}(1,5)\) and \(Y\sim\operatorname{Unif}(2,8)\) independently. Find the density of \(S=X+Y\), then calculate \(P(S\le 8)\).
Method. Use the convolution overlap formula. The widths are \(m=5-1=4\) and \(n=8-2=6\), so \(mn=24\). The support is \([1+2,5+8]=[3,13]\). The breakpoints are \(3+\min(4,6)=7\) and \(3+\max(4,6)=9\).
The density is therefore
To find \(P(S\le8)\), integrate first over the rising section from 3 to 7, then over the plateau from 7 to 8:
Check. The total area is a rising triangle of area \(\tfrac12(4)(1/6)=1/3\), a rectangle of area \(2(1/6)=1/3\), and a falling triangle of area \(\tfrac12(4)(1/6)=1/3\). Their areas sum to 1, as required. The answer is \(P(S\le8)=0.5000\) to four decimals.
Mistake avoided: The different widths create a plateau from 7 to 9. Treating the density as triangular would miss the constant-density section and give the wrong density.
Worked Example: Probability Across the Plateau and Falling Section
A hypothetical sensor has two independent uniform error components, \(X\sim\operatorname{Unif}(-2,1)\) and \(Y\sim\operatorname{Unif}(4,9)\). Find \(P(6<S<9)\), where \(S=X+Y\).
Method. The widths are \(m=1-(-2)=3\) and \(n=9-4=5\), and \(mn=15\). The support is \([-2+4,1+9]=[2,10]\). The breakpoints are \(2+3=5\) and \(2+5=7\). In particular, the requested interval crosses the breakpoint at 7, so it must be split:
From 6 to 7 the density is constant. From 7 to 9 it is falling. Thus
Check. The answer is \(7/15=0.4667\) to four decimals. The probability is less than 1, and the calculation includes one rectangle and part of the falling section, with no contribution from outside the requested interval.
Mistake avoided: Applying the plateau height \(1/5\) all the way to 9 overstates the probability. The density begins to fall at 7, so the integral must use the falling formula after that point.
Worked Example: A Probability That Crosses Two Breakpoints
Let \(X\sim\operatorname{Unif}(0,2)\) and \(Y\sim\operatorname{Unif}(1,4)\) independently. Find the density of \(S=X+Y\) and calculate \(P(2<S<4.5)\).
Method. The widths are \(m=2\), \(n=3\), and \(mn=6\). The support is \([0+1,2+4]=[1,6]\). The breakpoints are \(1+2=3\) and \(1+3=4\), giving
The interval \((2,4.5)\) crosses both breakpoints. Integrate each part separately:
Check. \(35/48=0.7292\) to four decimals. The event contains one segment from each of the rising, constant, and falling sections, and the three integrated contributions sum to a probability below 1.
Mistake avoided: A single integration formula cannot be used across the whole interval because the density changes at 3 and 4. Splitting at both breakpoints keeps each integral matched to the correct piece.
Common Exam Trap and Practical Checks
A tempting shortcut is to draw a symmetric triangle for every sum of two uniforms. That is justified only when the widths are equal. With unequal widths, the shorter interval can remain entirely inside the longer one for a range of totals, producing a plateau.
For example, in the first worked example, an incorrect triangular guess on support \([3,13]\) would place its peak at \(s=8\). If that triangle were normalized to total area 1, its height would be \(2/10=0.2\), giving the incorrect value \(f_S(8)=0.2\). The correct density is \(1/6\), because 8 lies in the plateau from 7 to 9. The correction is to compare the widths first: \(4\ne6\), so the plateau has positive width \(6-4=2\).
Before using a density or evaluating an event, check the following:
- Support: no sum can fall below \(a+c\) or exceed \(b+d\).
- Breakpoints: the two interior breakpoints are \(a+c+\min(m,n)\) and \(a+c+\max(m,n)\).
- Height: the plateau height \(1/\max(m,n)\) agrees with the maximum overlap divided by \(mn\).
- Total area: the rising triangle, plateau rectangle, and falling triangle must have areas summing to 1.
- Integration limits: split a probability integral at every breakpoint inside the event interval.
These checks are especially useful when interval endpoints are shifted away from zero. The shifts change the location of the support and breakpoints, but not the basic rise–plateau–fall shape or the way the widths determine it. This overlap method is aligned with the SOA Exam P (Probability) syllabus.
Check Your Understanding
For each problem, assume the two uniform variables are independent. Identify the relevant breakpoints before calculating any probability.
- Let \(X\sim\operatorname{Unif}(0,1)\) and \(Y\sim\operatorname{Unif}(2,5)\). Give the support and the piecewise density of \(S=X+Y\). (Answer: support \([2,6]\); \(f_S(s)=(s-2)/3\) for \(2\le s<3\), \(f_S(s)=1/3\) for \(3\le s<5\), \(f_S(s)=(6-s)/3\) for \(5\le s\le6\), and 0 otherwise.)
- Let \(X\sim\operatorname{Unif}(-1,3)\) and \(Y\sim\operatorname{Unif}(0,2)\). Find \(P(S>2)\). (Answer: \(0.5000\).)
- Let \(X\sim\operatorname{Unif}(1,4)\) and \(Y\sim\operatorname{Unif}(2,6)\). Find \(P(5<S<8)\). (Answer: \(2/3=0.6667\).)
- Let \(X\sim\operatorname{Unif}(-3,2)\) and \(Y\sim\operatorname{Unif}(1,4)\). Find \(P(S\le0)\). (Answer: \(2/15=0.1333\).)
- Let \(X\sim\operatorname{Unif}(0,3)\) and \(Y\sim\operatorname{Unif}(2,7)\). Find \(P(4<S<8)\). (Answer: \(2/3=0.6667\).)