Piece wise function of two random variables

21 Views Asked by At

Problem

A farmer owns 2 cows. Let $X$ be how many liters cow A produces in a day, then $X$ has exponential distribution of parameter $\frac {1}{5}$. Cow B produces 5 liters with probability $\frac {1}{5}$ and 0 otherwise, lets call that $Y$. Cow B is only milked if cow A produces less than 6 liters that day.

Now let's call $Z$ the total amount of milk he gets that day, the amount of butter he can make with that is $$ g(Z) = \ \begin{cases} {\sqrt[3]{Z}} &\quad\text{if } Z\leq 8 \\ {\frac{(Z-1)^2}{7} - 5} &\quad\text{if } 8<Z\le15\\ {2Z-7} &\quad\text{if } Z > 15\\ \end{cases} $$

Find the density function of $W = g(Z)$.


I start by trying to unwrap $P(W \le t)$ because then I can use that $f_{W}(t) = \frac{d(P(W\le t))}{dt}$. First using total probability so we can focus on each piece:

$$\Pr(g(Z) \le t) = \Pr(\sqrt[3]{Z} \le t \mid Z \le 8)\Pr(Z\le8) + \Pr(\frac{(Z-1)^2}{7} - 5 \le t \mid 8 < Z \le 15) \Pr(8 < Z \le 15) + \Pr(2Z-7 \le t \mid 15 < Z) \Pr(15 < Z)$$

Now we can clear out the Z on each one:

$$\Pr(g(Z) \le t) = \Pr( Z \le t^{3} \mid Z \le 8)\Pr(Z\le8) + \Pr( Z \le \sqrt{7(t+5)} + 1 \mid 8 < Z \le 15) \Pr(8 < Z \le 15) + \Pr(Z \le \frac{(t+7)}{2} \mid 15 < Z) \Pr(15 < Z)$$

This is more or less where I'm stuck. I tried to continue a couple of ways but I get bogged down in a ton of conditions and I feel like that's not the way to do it.

My "best" approach I think is conditioning for $Y$, so the first part would be:

$$ \Pr( Z \le t^{3} \mid Z \le 8) = \Pr (X \le t^{3} \mid X \le 8 \, , \, Y=0) \Pr(Y=0) + \Pr(X \le t^{3} - 5 \mid X\le 3 \, , \, Y=5) \Pr(Y=5)$$

Now on the next section where $Z \in (8,15]$ I would also need to split between $(8,11)$ and $[11,15]$ since 11 is the most he can get using the 2 cows. In the last section we only get milk from cow A so that's relatively straight forward.

I would really appreciate any help with how to approach this, otherwise I fear I might run out of paper.