Computing CDF with the total probability rule

77 Views Asked by At

I tried to come up with the answer without success. I hope somebody can help me.

Given $$X∼Exp(1)$$ $$Z∼Bernoulli(1/4)$$ $$W=(-1)^ZX$$

I have to compute the CDF of $W$.

I know that the total probability rule has to be applied so:

$$P(W\leq x)=\frac{1}{4}P(W\leq x|Z=1)+\frac{3}{4}P(W\leq x|Z=0) $$ but when $Z=1$ then $W=-X$ and I don't know how to proceed as the exponential distribution is only defined for positive values. Maybe there's a wrong assumption at some point?

1

There are 1 best solutions below

0
On BEST ANSWER

Graphical comment:

A 50-50 mixture of $X \sim \mathsf{Exp}(1)$ with $-X$ is a standard Laplace distribution, also called a 'double exponential' distribution.

What you have is a mixture of $X$ and $-X$ that is not 50-50.

You have made a reasonable start. Maybe seeing a histogram of a large simulated sample from your distribution will help you find the right path to finishing your analytic solution.

set.seed(2021)
x = rexp(10^5, 1)         # exponential
z = rbinom(10^5, 1, 1/4)  # Bernoulli
w = (-1)^z * x
summary(w);  sd(w)
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-10.763324  -0.001268   0.405202   0.499026   1.094519  13.115321 
[1] 1.324195              # sample SD

hist(w, prob=T, br=50, col="skyblue2")
 abline(v=0, lwd=2, col="darkgreen")

enter image description here

A quarter of the probability in your distribution lies below $0.$

mean(w < 0)
[1] 0.25034   # aprx 1/4