How to find the limits of integration for a convolution of pdfs?
As the title suggests. I have been trying to figure this out for a long time now and I'm completely out of ideas.
Say we have two pdfs $f_X(x) = \begin{cases} 1/2 & 0 \le x \le 2 \\ 0 & elsewhere \\ \end{cases} $
and $f_Y(y) = \begin{cases} 1/3 & 0 \le x \le 3 \\ 0 & elsewhere \\ \end{cases}$
Obviously, the random variables $X$ and $Y$ have uniform distributions.
When I attempt to find the sum of these variables by the convolution, I cannot figure out how to work out the limits of the integral. Can anyone explain in detail how it works and possibly provide a general solution for two arbitary random variables?
EDIT: the convolution formula is given by $f_Z(z) = \int_{-\infty}^{\infty} f_X(x)f_Y(z-x) dx$
Solution 1:
You are simply integrating over the joint support -- that is: where both functions are not zero.
$$\begin{align}f_Z(z)&=\int_{0\leq x\leq 2,0\leq z-x\leq 3}\tfrac 16\,\mathrm dx\\[1ex]&=\mathbf 1_{0\leq z\leq5}\int_{\max\{0,z-3\}\leq x\leq\min\{2,z\}}\tfrac 16\,\mathrm dx \\[3ex]&=\dfrac{1}{6}\cdot\begin{cases}\underline{\phantom{z\qquad}} &:& 0\leq z\lt 2\\\underline{\phantom{2\qquad}}&:& 2\leq z\lt 3\\\underline{\phantom{5-z~}}&:& 3\leq z\leq 5\\0&:&\text{elsewhere}\end{cases} \end{align}$$
Solution 2:
Hints:
- Figure out the range of values that $Z=X+Y$ can take on. Write down that $f_Z(z)$ for all $z$ outside the range you found.
- Pick a number (say $1.12$) from the range found in Step 1.
- Write the convolution integral $\displaystyle f_Z(1.12) = \int_{-\infty}^\infty f_X(x)f_Y(1.12-x) \,\mathrm dx.$
- Notice that as $x$ sweeps from $-\infty$ to $\infty$, $f_X(x)$ has value $0$ everywhere except when $x\in [0,2]$ (where it has value $\frac 12$) and so the integral in Step 3 can be simplified to $$f_Z(1.12) = \int_{0}^2 \frac 12f_Y(1.12-x) \,\mathrm dx.$$
- Notice that as $x$ from $-\infty$ to $\infty$, $f_Y(1.12-x)$ has value $0$ everywhere except when $1.12-x\in [0,3]$, that is, when $x\in [-2.88,1.12]$, and in this interval, $f_Y(1.12-x)$ has value $\frac 13$. Hence, the integral in Step 4 can be further simplified to $$f_Z(1.12) = \int_{0}^{1.12} \frac 12\cdot \frac 13 \,\mathrm dx.$$
- Evaluate the integral in Step 5 to get the value of $f_Z(1.12)$.
- Return to Step 2 to pick another number and repeat the whole process until you are sick and tired of the drudgery involved.
If you work carefully and systematically, writing down all results, after a while, you might observe a trend resulting in an "Hey Ma, I think I am beginning to see a pattern here!" moment, and be able to write down expressions (a.k.a. formulas) for $f_Z(z)$ that apply depending on the value of $z$. Be warned: there are three different formulas that you ought be coming up with and if you find fewer (or more!), you have done something wrong somewhere.