This is a sample question in the book, and I already have the answer, there is one step I am really confused about:
$$X=0.5X_1+0.5X_2$$ So I know: $$Var[X]=E[X^2]−E[X]^2$$ and then I already figured out $E[X]^2$, $E((X_1)^2)$, and $E((X_2)^2)$ However, for $E[X^2]$, as indicated in the book, it says: $$E(X^2)=\frac{1}{2}E((X_1)^2)+\frac{1}{2}E((X_2)^2)$$ Where did this come from?
The originally question is that given the CDF of the function as: $$F_x(x)=\left\{\begin{matrix} 0, for x<1\\ \frac{x^2-2X+2}{2}, for 1\leq x< 2\\ 1, for x\geq 2 \end{matrix}\right.$$
I managed to figure out that $X_1$ is a discrete function with probability of 1 at x=1, and everything else 0. The continuous function $X_2$ has probability $2x-2$ for $1<x<2$, and 0 elsewhere.
Any help is appreciated. Thanks in advance.