Probability density function of three independent random variables

53 Views Asked by At

I will try to describe the question first and how i solve the problem.

Here we have three independent random variable $X,Y,Z$ and $S_3=X+Y+Z$, the probability density function of three variable are all
$f(x)=\frac{1}{2}$, if $x \in [-1, 1]$,
$f(x)=0$, if $x$ is otherwise,
and i want to find the probability density function of $S_3$, $f(S_3)$

Due to the three random variable, i need to do convolution twice, $S_2=X+Y$ first, and then $S_3=S_2+Z=X+Y+Z$,

The first result of my calculation is
$f(S_2) = \frac{1}{4}(S_2+2)$, if $x \in [-2, 0]$,
$f(S_2) = \frac{1}{4}(2-S_2)$, if $x \in [0, 2]$,
$f(S_2)=0$, if $S_2$ is otherwise.

Next is the convolution of $S_2$ and $Z$,
for $-3<S_3<-1:$
$f(S_3)=\frac{1}{2}\int_{-2}^{S_3+1} \frac{1}{4}(S_3-Z+2)dZ= \frac{1}{16}(S_3+3)(S_3+5)$
for $-1<S_3<1:$
$f(S_3)=\frac{1}{2}\int_{S_3-1}^{0} \frac{1}{4}(S_3-Z+2)dZ + \frac{1}{2}\int_{0}^{S_3+1} \frac{1}{4}(2-S_3+Z)dZ = \frac{1}{8}(S_3^2-5)$
for $1<S_3<3:$
$f(S_3)=\frac{1}{2}\int_{S_3-1}^{2} \frac{1}{4}(2-S_3+Z)dZ= \frac{1}{16}(S_3-3)(S_3-5)$

and the plot is enter image description here

Although I haven't calculated it, this plot shows that the integral of the probability density function is significantly greater than 1.
I am hoping someone can point out what mistake i make.