7
$\begingroup$

Let $X$ be an exponential random variable $f(x) = c e^{-c x} \text{ if }x > 0; 0 \text{ otherwise.}$ Let $Z$ be a Bernoulli RV with $Pr(Z=1)=0.45$ and $Pr(Z=0)=0.55$.

$X$ and $Z$ are independent.

Let $Y$ be the product of $X$ and $Z$: $Y=XZ$. What's the distribution of $Y$?

Here's my attempt:

$Pr(Y\leqslant y)=Pr(XZ\leqslant y)=Pr(XZ\leqslant y \cap Z=1)+Pr(XZ\leqslant y \cap Z=0)$

Due to independence, the above equation becomes

$$ \begin{align} &Pr(XZ\leqslant y)Pr(Z=1)+ Pr(XZ\leqslant y)Pr(Z=0)\\ =&Pr(X\leqslant y)Pr(Z=1)+ Pr(0\leqslant y)Pr(Z=0)\\ =&0.45Pr(X\leqslant y)+0.55Pr(y\geqslant 0) \end{align} $$

Plug in $Pr(X\leqslant y)=F_X(y)$ and $Pr(y\geqslant 0)=1$:

$Pr(Y\leqslant y)=0.45(1-e^{-cy})+0.55=1-0.45e^{-cy}$

But this can't be right: it's not a valid cdf. What did I do wrong here? Thanks in advance!

Edit: it is a correct cdf. I had a brain freeze for a moment.

$\endgroup$
2
  • 1
    $\begingroup$ It is valid cdf if you write clearly about the range of $y$. $\endgroup$
    – user158565
    Commented Dec 11, 2018 at 3:06
  • $\begingroup$ I've considered that. In this case, $y>0$. That makes it an invalid cdf. $\endgroup$
    – tcollar
    Commented Dec 11, 2018 at 3:09

2 Answers 2

7
$\begingroup$

I don't know why you call this an invalid CDF.

You have a mixed random variable $Y$:

$$Y=XZ=\begin{cases}0&,\text{ if }Z=0\\X&,\text{ if }Z=1\end{cases}$$

So the distribution function of $Y$ must be

\begin{align} P(Y\le y)&=P(XZ\le y) \\\\&=P(XZ\le y\mid Z=0)P(Z=0)+P(XZ\le y\mid Z=1)P(Z=1) \\\\&=\begin{cases}P(Z=0)+P(X\le y)P(Z=1)&,\text{ if }y\ge0 \\0&,\text{ if }y<0\end{cases} \\\\&=\begin{cases}0.55+0.45(1-e^{-cy})&,\text{ if }y\ge0\\ 0&,\text{ if }y<0\end{cases} \end{align}

That is,

$$F(y)=P(Y\le y)=\begin{cases}1-0.45e^{-cy}&,\text{ if }y\ge0\\ 0&,\text{ if }y<0\end{cases}$$

Taking $c=1$, the plot of $F(y)$ looks like

enter image description here

If you check the conditions of a valid CDF, you will see that $F$ satisfies all those conditions.

$\endgroup$
1
  • 1
    $\begingroup$ I made a mistake. I thought when $y$ approaches $\infty$, $e^{-cy}$ approaches 1, so $F(y)$ $\rightarrow$ 0.55. Actually, when $y$ approaches $\infty$, $e^{-cy}$ approaches 0. $F(y)$ is a valid cdf. $\endgroup$
    – tcollar
    Commented Dec 12, 2018 at 2:10
1
$\begingroup$

The first three central moments of $Y$ are as follows:

The expectation of $Y$ can be written as: $$\displaystyle \mu_{{1}}\, = \, E(Y) \, = \, 0 \, (1-p) \, + \, \int_{0}^{\infty }\!\, p \, y \, c \,{{\rm e}^{- c \,y}}\,{\rm d}y \,= \, \frac {p}{ c }$$ The variance of $Y$ can be writt en as: $$\displaystyle \mu_{{2}}\, = \, Var(Y) \, = \, (1-p) \, \left(0-\frac{p}{ c }\right) ^2 +\int_{0}^{\infty }\!p \, \left( y-{\frac {p}{ c }} \right) ^{2} c \,{{\rm e}^{- c \,y}}\,{\rm d}y \, = \,-{\frac {p \left( p-2 \right) }{{ c }^{2}}}$$ The third central moment can be written as: $$\displaystyle \mu_{{3}}\, = \, (1-p) \, \left(0-\frac{p}{ c }\right) ^3 +\int_{0}^{\infty }\!p \, \left( y-{\frac {p}{ c }} \right) ^{3} c \,{{\rm e}^{- c \,y}}\,{\rm d}y \, = \,2\,{\frac {p \left( {p}^{2}-3\,p+3 \right) }{{ c }^{3}}}$$

with $p = Pr(Z=1)$ and $(1-p) = Pr(Z=0)$.

$\endgroup$
4
  • 1
    $\begingroup$ Could you indicate how a computation of central moments answers the question about the distribution? $\endgroup$
    – whuber
    Commented Nov 16, 2019 at 18:16
  • $\begingroup$ No, I couldn't do that and that's why I re-edited the text. $\endgroup$ Commented Nov 17, 2019 at 9:33
  • 1
    $\begingroup$ I'm puzzled: since your post doesn't answer the question, why have you put it in this thread? $\endgroup$
    – whuber
    Commented Nov 17, 2019 at 19:28
  • $\begingroup$ The title of the OP is "The distribution of ..." and given how the internet works it can be useful to have complementary information here. $\endgroup$
    – PatrickT
    Commented Sep 11, 2022 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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