Derivative of the maximum of two random variables For any two real numbers $a$ and $b$ and any two random variables (with no mass points in their distributions) $x$ and $y$, why is it that the derivative of $E[\max\{a+x,b+y\}]$ with respect to $a$ is $\Pr(a+x>b+y)$?

Use the law of total expectation:
\begin{align}
& \lim_{\Delta a\to0}\frac{\operatorname E(\max\{a+\Delta a+x,b+y\}) - \operatorname E(\max\{a+x,b+y\})}{\Delta a} \\[10pt]
= {} & \operatorname E \left(\lim_{\Delta a\to0}\frac{ \max\{a+\Delta a+x,b+y\} - \max\{a+x,b+y\}}{\Delta a}\right) \\[10pt]
= {} & \operatorname E\left( \operatorname E\left( \left.\lim_{\Delta a\to0}\frac{ \max\{a+\Delta a+x,b+y\} - \max\{a+x,b+y\}}{\Delta a} \,\right|\, I \right)\right)
\end{align}
where
$$
I = \begin{cases} 0 & \text{if }\max\{a+x,b+y\} = b+y \\[8pt] 1 & \text{if } \max\{a+x,b+y\} = a+x  \end{cases}
$$
If $b+y$ is the maximum, then the conditional expected value is $0$.
If $a+x$ is the maximum, then the conditional expected value is $1$.
So the outer expected value is the expected value of a random variable that is $1$ with probability equal to $\Pr(a+x>b+y)$ and $0$ with the complementary probability.
