# Sum of two random variables

nikki92

## Homework Statement

X is uniform [e,f] and Y is uniform [g,h]

find the pdf of Z=X+Y

## Homework Equations

f_z (t) = f_x (x) f_y (t-x) ie convolution

## The Attempt at a Solution

Obviously the lower pound is e+g and the upper bound is f+h

so it is a triangle from e+g to f+h. The tip of the triangle still in the center of the distribution i.e. .5[e+g+f+h)

so would the pdf be t for e+g< t < .5[e+g+f+h]
g+h - t for .5[e+g+f+h] <t <g+h
and 0 otherwise?

## Answers and Replies

Homework Helper
Gold Member
so it is a triangle from e+g to f+h.
It will not in general be a triangle.
Draw a diagram of the event space, putting the two random variables on the x and y axes. Draw a line through it representing the sum having some given value.

Homework Helper
Gold Member
It will not in general be a triangle.
Draw a diagram of the event space, putting the two random variables on the x and y axes. Draw a line through it representing the sum having some given value.

And you get a blizzard of cases depending on the relative sizes of e,f,g,h.

nikki92
I am confused. Originally I wanted to take the characteristic equation, but the inverse fourier transformation to avoid cases. Do I have to assume each case when e,f,g,h, <0 and e,f,g < 0 and h> 0 .... etc all combination of events and maybe = 0 ? There seems to be way too much work for this problem and what confuses me is that the teacher said it formed a triangle.

Homework Helper
Gold Member
There are only two cases that you need to consider: (1) ##f-e \leq h-g## and (2) ##f-e > h-g##. In each case, the pdf of ##Z## can be specified piecewise. As noted, it will be a triangle if ##f-e = h-g##. In general, it will be another geometric shape. (Hint: the pdfs of ##X## and ##Y## are rectangular. Suppose one rectangle is narrower than the other. What happens with the convolution at offsets where the narrower rectangle's base is contained within the wider rectangle's base?)

By the way, the original post doesn't mention whether ##X## and ##Y## are independent. The pdf of ##Z = X+Y## is not necessarily a convolution if this is not the case.

• 1 person
Homework Helper
Dearly Missed

## Homework Statement

X is uniform [e,f] and Y is uniform [g,h]

find the pdf of Z=X+Y

## Homework Equations

f_z (t) = f_x (x) f_y (t-x) ie convolution

## The Attempt at a Solution

Obviously the lower pound is e+g and the upper bound is f+h

so it is a triangle from e+g to f+h. The tip of the triangle still in the center of the distribution i.e. .5[e+g+f+h)

so would the pdf be t for e+g< t < .5[e+g+f+h]
g+h - t for .5[e+g+f+h] <t <g+h
and 0 otherwise?

It is straigtforward to get a solution to the general case here by using Laplace transforms, provided that you allow negative values, if necessary; that is, regard the Laplace transform as being ##\int_{-\infty}^{\infty} e^{-sx} f(x) \, dx## for functions that are zero for ##x < -M## for some finite ##M > 0##. Alternatively, assume your e,f,g,h are all ≥ 0 by shifting everything to the right if need be. You can re-write the LT of the sum as a sum of four easily-inverted LTs, resulting in things involving Heaviside functions; these will take care of all the possible "cases".

Last edited:
• 1 person