Biostatistics · Intermediate

Sums of Continuous Random Variables

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

The distribution of the sum of independent continuous random variables is determined by the convolution of their individual probability density functions. For any linear combination of random variables, the expected value is the linear combination of the expected values, and for independent variables, the variance of the sum is the sum of their variances.

Intuition

When you add two independent random variables, you are essentially combining their uncertainties. The resulting distribution is not just a simple addition of values but a blending of their shapes, mathematically described by convolution. This process integrates the product of one variable's density and the shifted density of the other. While the shape of the distribution changes via convolution, the central tendency (expected value) and spread (variance) follow simpler linear rules, provided the variables are independent.

Key equations

(f∗g)(z)=∫−∞+∞f(z−y)g(y)dy
(1)

The convolution of two density functions f and g, which gives the density of the sum of independent random variables.

L=c1X1+…+cnXn
(2)

A linear combination of random variables.

E(L)=∑i=1nciE(Xi)
(3)

The expected value of a linear combination of random variables.

Derivation

  1. Define a linear combination L as a function of random variables X_i with coefficients c_i.
  2. For the sum of two independent continuous random variables X and Y, the density of Z = X + Y is derived by integrating the product of the density of X and the shifted density of Y over all possible values.
  3. This integration process is formally defined as the convolution integral (f * g)(z).
  4. The expected value of L is calculated by applying the linearity of expectation, resulting in the sum of coefficients times individual expected values.
  5. For independent variables, the variance of the sum is the sum of the individual variances, as covariance terms are zero.

Worked example

Problem

Calculate the density of the sum Z = X + Y where X and Y are independent uniform random variables on [0, 1].

  1. Identify that X and Y are independent uniform random variables on [0, 1].
  2. Apply the convolution formula for the sum of independent variables.
  3. Evaluate the integral of the product of densities over the support.
  4. Determine the resulting piecewise function based on the range of z.

Answer The density of Z is f_Z(z) = z for 0 <= z <= 1 and 2 - z for 1 < z <= 2.

Common mistakes

  • Assuming the density of the sum is the convolution of densities without verifying independence.
  • Confusing mixtures (selecting a distribution) with sums (adding random variables).
  • Applying the sum of variances rule to dependent variables without accounting for covariance.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.