I was given the following problem:
Let $X\sim U[-3,-1]$, $Y\sim\text{Exp}(1/4)$, and $Z\sim\text{Bern}(3/4)$ be independent random variables. Let $T$ be defined as:
$$T = \begin{cases} X & Z = 0 \\ Y & Z = 1\end{cases}$$
a. Compute the CDF of $T$
b. Compute $\mathbb{E}[TZ]$
c. Compute $\text{Cov}(T,Z)$
I've also been given the following worked solutions for this problem:
I'm having issues understanding this worked solution though. My questions are:
What formula, principle or theorem did we use by applying $\mathbb{E}(T)=\mathbb{E}(Y)\Pr(Z=1)$.
why is $F_T(t)=1/4$ for $t\in[-1,0)$?
How did we get the expression:
$$TZ = \begin{cases} 0 & T <0\\ T & T\geq 0\end{cases}$$


This means that:
$$\mathbb{E}[TZ] = \mathbb{E}[\mathbb{E}[TZ|Z]]$$
Now, we have that: $$\mathbb{E}[TZ] = \mathbb{E}[TZ|Z = 0] \Pr[Z = 0] + \mathbb{E}[TZ|Z = 1]\Pr[Z = 1]$$ We have that $\mathbb{E}[TZ|Z = 0]=\mathbb{E}[0X] = 0$, and that $\mathbb{E}[TZ|Z = 1] = \mathbb{E}[Y]$, so:
$$\mathbb{E}[TZ] = \mathbb{E}[Y]\Pr[Z = 1]$$ as desired.
$$F_T(t) = \Pr[X < t]\frac{1}{4} + \Pr[Y < t] \frac{3}{4} = 1\frac{1}{4} + 0\frac{3}{4} = \frac{1}{4},\quad t\in [-1,0)$$
This observes that the only way for $T\geq 0$ to hold is if $T = Y$ and $Z = 1$, so $TZ = T*1 = T$ (It's additionally the case that $T = Y$, but writing this doesn't aid the integral later).
Similarly, the only way for $T < 0$ to hold is if $T = X < 0$, but this occurs when $Z = 0$, so $TZ = X*0 = 0$.