# Expected value random variable.

Let $$X \sim U[-1,1]$$. We define :

$$Y=\begin{cases} X^2 &\text{for } X > \frac{1}{2} \\ 3 &\text{for } X \le \frac{1}{2} \end{cases}$$

Find expected value of $$Y$$. My solution : $$E(Y)=E\left( X^2 \cdot \hbox{1}_{\left\{ X > \frac{1}{2}\right\} }+ 3 \cdot \hbox{1} _{\left\{ X \le \frac{1}{2}\right\} }\right)$$. And I have sum of two integrals : $$\int_{ \frac{1}{2} }^{1}x^2\cdot \frac{1}{2}dx + \int_{-1}^{ \frac{1}{2} } \frac{3}{2} dx$$.

What do you think? It's correct?

• Yes it is correct. – StubbornAtom Dec 15 '18 at 11:27