$X \sim F(x)$
$$F(x)=\begin{cases}0,&x<0\\x^2,&0\leq x<1/2\\x,&1/2\leq x<1\\1,&x>1\end{cases}$$
(not right-continuous)
I want to compute $\operatorname{Var}(X)$.
Is this correct:
$$\mathbb E[X]=\int_0^{1/2}2x^2\,dx+\int_{1/2}^1x\,dx+1/2\cdot \mathbb P(1/2)$$
How can I evaluate $\mathbb P(X=1/2)$? Is it $1/2 -(1/2)^2$? And how do I evaluate $\mathbb E[X^2]$?
$$Y:=X^2$$
$$F_Y(x)=\mathbb P[Y \leq x]=\mathbb P[X^2 \leq x]=\mathbb P[X \leq \sqrt x]=F(\sqrt x)=\begin{cases}0,&x<0\\x,&0\leq x<1/4\\\sqrt x,&1/4\leq x<1\\1,&x>1\end{cases}$$
$$\mathbb E[X^2]=\int_0^{1/2}2x^3\,dx+\int_{1/2}^1x^2\,dx+1/4\cdot \mathbb P(1/4)$$
$$\mathbb P(X=1/4)=\sqrt{1/4} -1/4?$$