Let $X_1, X_2$ and $X_3$ three independent random variables with PDF $f_{X_i}(x)$.
I would like to compute the average of random vraible saying $Z$. But here i have two events. The two events are $\phi$ and $\bar{\phi}$
$$ \phi=\{X_3\leq X_1\}, $$
and
$$\bar{\phi}=\{X_1< X_3\}.$$
I would like to get the expected value of $Z=X_1$ if the event $\phi$ occur
$$ E[X_1 ; \phi], $$ and the expected value of $Z=X_1+X_2$ if the event $\bar{\phi}$ occur
$$ E[X_1+X_2; \bar{\phi}]. $$
Finally I get $$ E[Z]=E[X_1; {\phi}]+E[X_1+X_2; \bar{\phi}]. $$ Thanks.
If $Z = (X_1 + X_2) \,[X_1 < X_3] + X_1 \,[X_3 \leq X_1]$, then $$Z = X_1 + X_2 \,[X_1 < X_3], \\ \operatorname{E}(Z) = \operatorname{E}(X_1) + \operatorname{E}(X_2 \mid X_1 < X_3) \operatorname{P}(X_1 < X_3) =\\ \operatorname{E}(X_1) + \operatorname{E}(X_2) \operatorname{P}(X_1 < X_3).$$