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}$

  • $\begingroup$ change the variables and then integrate $\endgroup$
    – Exodd
    Jan 9, 2021 at 18:52
  • $\begingroup$ Can someone kindly help with this one? is everything clear with my question? I have been trying for hours and no result $\endgroup$ Jan 9, 2021 at 20:48

1 Answer 1


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?

  • $\begingroup$ Can you kindly continue in the same method I started? $\endgroup$ Jan 9, 2021 at 19:54
  • $\begingroup$ @White Im not sure what to do with $f_{-X}(-x)$ or what you are doing, instead try to follow the general procedure, that is $$\Pr [G(X_1,\ldots ,X_n)\leqslant c]=\Pr [(X_1,\ldots ,X_n)\in G^{-1}((-\infty ,c])]=\int_{G^{-1}((-\infty ,c])}\prod_{k=1}^n f_{X_n}(x_n)\mathop{}\!d (x_1,\ldots ,x_n)$$ where $X_1,\ldots ,X_n$ are independent and $G$ is any Lebesgue measurable function $\endgroup$
    – Masacroso
    Jan 9, 2021 at 22:08
  • $\begingroup$ I want it to be used with knowing that: (the sentence given by the question) $\endgroup$ Jan 10, 2021 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.