# Distribution of $L=(1-X)A + X(B + Z C)$, where $X$ and $Z$ are Bernoulli

Let,

$$X\sim\text{Bernoulli}(p),$$

$$A|X=0\sim exp(\text{rate}=\frac{1}{\alpha}),$$

$$B|X=1\sim exp(\text{rate}=\frac{1}{\beta}),$$

$$Z|X=1\sim \text{Bernoulli}(\theta),$$

$$C|Z=1\sim exp(\text{rate}=\frac{1}{\gamma}),$$

what is the distribution of

$$L=(1-X)A + X\{B + Z C\}$$?

I think $(1-X)$ is another bernoulli with probability $(1-p)$. Also, I know sum of two independent exponential random variables follows gamma distribution. But $B$ and $C$ are conditional. I don't know what is the distribution of product of conditional bernoulli and exponential random variables.

• Hint: Compute the distribution of L conditionally on X=0 and the distribution of L conditionally on X=1. – Did Mar 19 '17 at 12:37
• @Did for $X=0$, $L\sim exp(rate=\frac{1}{\alpha})$. Is $ZC\sim exp(rate=\frac{1}{\gamma})$? – user81411 Mar 19 '17 at 13:23
• If $U_i=exp(\lambda)$, then $\sum_{i=1}^{k}U_i\sim gamma(k,\lambda^{-1})$. But for my given problem, the parameters of $B$ and $C$ are different. It seems difficult to me to compute the distribution of $L$ conditionally on $X=1$. – user81411 Mar 19 '17 at 13:32
• The distribution of $L$ conditionally on $X=1$ is a barycenter of the distributions of $V$ and $V+W$ where $V$ and $W$ are independent and exponential with parameters $1/\beta$ and $1/\gamma$. Can you compute the distribution of $V+W$? – Did Mar 19 '17 at 13:58
• By the way, the statement of your exercise is rather illogical. In fact, one is given independent $(X,Z,A,B,C)$ with respective distributions Bernoulli with parameters $p$ and $\theta$, and exponential with parameters $1/\alpha$, $1/\beta$ and $1/\gamma$ respectively, and one asks for the distribution of $$L=(1-X)A+X(B+ZC)$$ – Did Mar 19 '17 at 14:00