I want to sum two random variables.
So $Z = X+Y$ and $f_{X+Y}(z)=\int_{-\infty}^{\infty}f_{xy}(x,z-x)dx $
So I wanted to test this out a bit. If $$f_{xy}(x,y) = 6∙10^{-4}(x^2+y^2)$$ when $-5\leq x \leq5$ and $-5\leq y \leq5$ and 0 elsewhere.
The joint distribution $$\int^5_{-5} \int^5_{-5} f_{xy}(x,y)dxdy = 1$$
But when I try to calculate the pdf of the sum of X and Y
$$f_{X+Y}(z)=\int_{-5}^{5}6∙10^{-4}(x^2+(z-x)^2)dx = \frac{1}{500}(3z^2+50) $$
If I integrate this function from -10 to 10 with respect to z, I get 6.0. Not 1.0. $$\int_{-10}^{10}\frac{1}{500}(3z^2+50)=\frac{1}{500}(z^3+50z)|^{10}_{-10}=\frac{1}{500}(2000+(50)(20))=6$$
What am I doing wrong? $f_{X+Y}(z)$ is a probability distribution so it should integrate to 1. And I shouldn't have to re-normalize it.
Check your limits of integration. Remember the joint density $f(x,y)$ is zero outside of $|x|\le 5$ and $|y|\le 5$, so the convolution requires the constraints $|x|\le 5$ and $|z-x|\le 5$.
Unfortunately this means you have to evaluate $f_{X+Y}(z)$ by cases, depending on the value of $z$. If you plot the region defined by the constraints, you'll have two cases: (1) $0\le z\le 10$, where you integrate $x$ from $z-5$ to $5$, and (2) $-10\le z\le 0$, where you integrate $x$ from $-5$ to $z+5$. Outside of these two cases the value of $f_{X+Y}(z)$ is zero.