U=max(0,x)
where x=a with probability q and b with probability 1-q.
I saw someone write:
$E(U)=\max(0,E(x))=\max(0,aq+(1-q)b)$
To me this looks wrong, am I right?
I would think it should be: $E(U)=q \max (0,a)+ (1-q) \max (0,b)$
They are identical if $a,b>0$. But not necessarily otherwise. For example if $b=-a$, and $q=1/2$, according to the first formula, $E(U)=0$.
But according to the latter:
$E(U)=\frac{1}{2} \max (0,a)+ \frac{1}{2} \max (0,-a)=\frac{a}{2}$
The former or the latter?
You are right. Expected value does not distribute through the max function, since the latter is not linear.
The person who wrote $E(U) = \max(0,E(x))$ must have been confused.