Calculating Density Function in Probability?

94 Views Asked by At

Given that: $Y \sim \text{Exp}(j)$ and $X \sim \text{Uni}(a,b)$ independent from each other. How may I calculate the density of $Z=Y-X$ knowing that: $$ f_{X+Y}(z)=\int_{-\infty}^\infty f_X(x)f_Y(z-x)\mathrm dx. $$


with your help I have calculated the density function for $-x$ which is

$$f_{-X}(-x) = \begin{cases} \dfrac{1}{b-a} &-x \in [a,b] \\ 0 & \text{otherwise}. \end{cases}$$

And I got too: $$\int_{-\infty}^\infty f_Y(y)f_{-X}(-x)dy$$

But how to continue from here? Plus how may I seperate the fields in which this is zero?

I know that: $$f_{Y}(y) = \begin{cases} \lambda e^{-\lambda y} &y >=0 \\ 0 & \text{otherwise}. \end{cases}$$


Update: I got

$f_Z(z)$= 0 if $y<0$ or $x<-b$ or $x>-a $

else $1/{b-a}$

My my book has a totally different Answer:

if $z<-b$ then $0$

if $z>-a$ then $\dfrac {e^{- \lambda(a+z)}-e^{- \lambda(b+z)}}{b-a}$

else $\dfrac {1- e^{- \lambda(b+z)}}{b-a}$

1

There are 1 best solutions below

3
On

HINT: you have that $$ \begin{align*} \Pr [X-Y\leqslant c]&=\int_{\{(x,y)\in\mathbb{R}^2:x-y\leqslant c\}}f_X(x)f_Y(y)\mathop{}\!d (x,y)\\ &=\int_{\mathbb{R}}f_Y(y)\left(\int_{(-\infty ,c+y]}f_X(x)\mathop{}\!dx\right)\mathop{}\!d y\\ &=\int_{\mathbb{R}}f_Y(y)F_X(c+y)\mathop{}\!d y \end{align*} $$

Can you follow from here?