Say $X$ to be uniformly distributed from $[0,1]$. Say $k_1$ and $k_2$ to be two non negative constants (that is, they take values from $[0,+inft]$.
I want to compute the expectation of the following max involving the two constants:
$$E[\max(X+k_1,k_2)]$$
(that is, the expectation of the max between the sum "random variable plus a constant k1" and "a constant k2").
As someone suggested:
let $Y=X+k_1$ be the uniform variable on $[k_1,k_1+1]$. Then your variable is $\max \{ Y,k_2 \}$. Cases:
- If $k_2 < k_1$, then $\max \{ Y,k_2 \} = Y$, so you have $E(Y)=\frac{2k_1+1}{2}$.
- If $k_2 > k_1+1$, then $\max \{ Y,k_2 \}=k_2$, so you have just $k_2$.
- If $k_1 \leq k_2 \leq k_1+1$, then $\mathbb{P}(Y \leq k_2) = k_2-k_1$.
how to handle the last case?
Let $Y=X+k_1$ be the uniform variable on $[k_1,k_1+1]$. Then your variable is $\max \{ Y,k_2 \}$. Cases:
Can you handle the last case?