Computing CDF from an exponential r.v. X and Bernoulli r.v. Z

193 Views Asked by At

I need to compute the CDF of Y=ZX and i am struggling to compute this when Y=ZX

Information:

X is an exponential random variable with parameter 1

Z a Bernouilli random variable taking its values in {−1, +1} with parameter 1/2.

I found a similar post: https://stats.stackexchange.com/questions/381384/the-distribution-of-the-product-of-a-bernoulli-an-exponential-random-variable But when i followed the methods of the answer provided here, i did not get the right answer.

I have submitted my attempt at an answer as a picture (as the formatting of Word equations are not appropriate to paste here)

Here is my solution, but this was an incorrect CDF.

I was told i need to consider both cases for X, -X, since Z takes its values [1,-1] and for that i have come up with the start of the PDF as such:

P(Y=y)=P(ZX≤x∩Z=1)+P(ZX≤x∩Z=-1) or P(Y=y)=P(X≤x) + P(-X≤x) But i do not know where to go from here.

I am struggling to understand how i can consider both cases in my PDF and CDF, together with the mathematical way of writing this out.

2

There are 2 best solutions below

1
On

If $y \geq 0$ then: $$\begin{align}\def\P{\operatorname{P}} \P(Y \leq y)&=\P(X \leq y,Z=1)+\P(-X \leq y, Z=-1)\\[1ex]&=\P(X \leq y)\P(Z=1)+\P(X\geq -y)\P(Z=-1)&\star\\[1ex] &=\tfrac 1 2 (1-e^{-y})+\tfrac 1 2\\[1ex]&=(1-\tfrac 12e^{-y})\end{align}$$ $\star$ assuming that $X$ and $Z$ are independent.

Can you now handle the case $y <0$?

2
On

The random variable $Y$ has a Laplace distribution. See Wikipedia at the start for a definition of the family of Laplace distributions and relevant bullets 3 and 10 under "Related Distributions."

Your random variable $Z$ is a modification of a Bernoulli; Bernoulli takes values 0 and 1.

$$f_Y(y) = .5e^{-|y|}$$ and

$F_Y(y) = .5e^y,$ for $y<0$ and $F_Y(y) = 1 - .5e^{-y},$ for $y\ge 0.$

Also, $E(Y) = 0$ and $Var(Y) = 2.$

There is already an answer (by@KaviRamaMurthy, +1) with good clues toward an analytic solution.

Here is a simulation in R of a million realizations of $Y,$ with their histogram matched by the theoretical PDF (red curve).

set.seed(425)
x = rexp(10^6)
z = sample(c(-1,1), 10^6, rep=T)
y = x*z
mean(y);  var(y)
[1] 0.001843293  # aprx E(Y) = 0
[1] 1.999268     # aprx Var(Y) = 2

enter image description here