\(V[X]=E[\left(X-E[X]\right)^{2}]=E[X^{2}]-(E[X])^{2}\)
\begin{eqnarray*}V[X]&=&E[\left(X-E[X]\right)^{2}]\\&=&E[X^{2}-2E[X]\cdot X+\{E[X]^{2}\}]\\&=&E[X^{2}]-2E[X]\cdot E[X]+E[X]^{2}\\&=&=E[X^{2}]-(E[X])^{2}\end{eqnarray*}
Welcome to Math World!
\begin{eqnarray*}V[X]&=&E[\left(X-E[X]\right)^{2}]\\&=&E[X^{2}-2E[X]\cdot X+\{E[X]^{2}\}]\\&=&E[X^{2}]-2E[X]\cdot E[X]+E[X]^{2}\\&=&=E[X^{2}]-(E[X])^{2}\end{eqnarray*}