I am not able to understand the difference between the joint density function and density function for a random variable $Z = X_1 + X_2$, where $X_1, X_2$ are uniform random variables in $[0,1]$.

I think joint density in this case is $f_{X_1, X_2}left(x_1,x_2right) = 1$ (reference)

Likewise the density function $f_Z$ is defined as convolution of $f_{X_1}$ and $f_{X_2}$ (reference: page 8)

Could someone please explain the difference between the two?

**Contents**hide

#### Best Answer

If you don't write down the support, you may not see what's going on — but as soon as you do, it's a lot clearer.

I am not able to understand the difference between the joint density function and density function for a random variable Z = x1 + x2 where x1, x2 are uniform rvs in [0,1].

Note that $f_{X_1}(x_1)=1$ for $0<x_1<1$ and $0$ elsewhere; similarly for $X_2$.

The joint density is bivariate – the density is a surface.

I think joint density in this case is f(x1,x2) = 1

So, assuming independence, the joint density will be: $f(x_1,x_2) = f_{X_1}(x_1), f_{X_2}(x_2)= 1 times 1=1$ on the unit square and $0$ elsewhere.

(At least, "bivariate uniform under independence")

Likewise the density function of z is defined as convolution of x1 and x2

It is the convolution if they're independent, yes.

The *sum* of a pair of quantities is a single quantity — the sum of a pair of random variables is a univariate random variable.

The density function of the sum of independent variables goes from the sum of the smallest values of each variable to the sum of the largest values of each variable. Consequently the sum of a pair of independent variates each on $(0,1)$ will lie in the interval $(0+0,1+1)$ (i.e. on $(0,2)$).

The shape of the density for the sum (as you'll find if you perform the convolution) is symmetric and triangular, though it's also obvious from direct inspection of a picture of the joint density:

The blue arrows show all the density at a fixed $x_1+x_2$; this is evaluated at each point along the red line. You can see the amount of density at each point increases linearly until the peak at 1, then decreases linearly again.