-1

"Let x and y be independent random variables, which are both uniform in (-2,6) If z=x+y find and plot its pdf."

How can I draw this pdf?

My working:

enter image description here

Glen_b
  • 282,281
  • 2
    You can't draw it until you work out what its equation is. What did you get for the pdf? Please edit to show what you did. – Glen_b Apr 05 '17 at 07:41
  • @Glen_b That is good advice, though I suspect that I personally might draw it first: identify the minimum and maximum, and the mode, draw the shape of the density lines and then decide the scale of the probability density to make the total probability $1$. But that depends on knowing the shape of the result, and that comes from experience – Henry Apr 05 '17 at 07:45
  • @Glen_b I've worked out like that. link – kubicwerke Apr 05 '17 at 08:42
  • Kubilay -- I included your attempt in your question and reopened. Your first problem isn't drawing it, it's working out the density. You should review how to do that. Can you do it for the case of two independent uniform (0,1) variates? You might get some value from reviewing the answers here. – Glen_b Apr 05 '17 at 09:35
  • You may find it helpful to read the MathJax tutorial and quick reference, which will help you put any working into your posts. – Glen_b Apr 05 '17 at 09:44

1 Answers1

0

You nearly have the correct answer. It is true that $\displaystyle f_Z(z) = \int_{-2}^6 f_X(z-y)f_Y(y)\,\mathrm dy$ but the value of the integral is not $\frac 18$ as you write. Bear in mind that your task is to find the value of the density $f_Z(z)$ for each and every real number $z, -\infty < z < \infty$. For example, that integral is telling you that $$f_Z(5) = \int_{-2}^6 f_X(5-y)f_Y(y)\,\mathrm dy.$$ But notice that as $y$ varies from $-2$ to $8$, the argument of $f_X$ inside the integral decreases from $5-(-2) = 7$ to $5-6=-1$ and since $f_X$ equals $0$ when its argument exceeds $6$, we have that $$f_X(5-y)f_Y(y) = \begin{cases}0\times\frac 18 = 0, & -2 < y < -1,\\\frac 18\times \frac 18 = \frac{1}{64}, & -1 \leq y < 6\end{cases}$$ It follows that $$f_Z(5) = \int_{-2}^6 f_X(5-y)f_Y(y)\,\mathrm dy = \int_{-2}^{-1} 0\,\mathrm dy + \int_{-1}^{6} \frac{1}{64}\,\mathrm dy = \frac{7}{64}.$$ Repeat this calculation for numerous other values of $5$ (say integers in the range $-5$ to $14$) and you will get different values for $f_Z$, enough that you can plot them and get a rough idea about what the graph of $f_Z(z)$ looks like. Now, as far as mathematical formulas are concerned, you might start with something like

Let $z$ denote some fixed number in $(-4,4)$. Then, as $y$ varies from $-2$ to $6$, $f_X(z-y)$ is nonzero only for $y \in \cdots$ and so $\displaystyle f_Z(z) = \int_{-2}^6 f_X(z-y)f_Y(y)\,\mathrm dy$ has value $\frac{g(z)}{64}$.
Next let $z$ denote some fixed number in $(4,12)$. Then, as .....

Dilip Sarwate
  • 46,658