[Exer5-3] (A Shortcut Formula for $\sigma^2$) Proposition of Book {Devore2017B} P.116
The expected value of $X$ measures where the probability distribution is centered. We will use the variance of $X$ to measure the amount of variability in (the distribution of) $X$.
Let $X$ have pmf $p(x)$ and expected value $\mu$. Then the variance of $X$ ($X$ 的方差), denoted by $V(X)$ or $\sigma_X^2$, or just $\sigma^2$, is defined by
\[
V(X):=\sum_{D}(x-\mu)^2\cdot p(x)=E\bigl[(X-\mu)^2\bigr]
\]
Prove that
\[
V(X)=E(X^2)-(E(X))^2.
\]
i.e.,
\[V(X)=\sigma^2=\biggl[\sum_{D}x^2\cdot p(x)\biggr]-\mu^2\]