In this wiki subpage about conditional probability we read that if $(\Omega, \mathcal{F}, \mathcal{P})$ is a probability space and $X:\Omega\to\mathbb{R}$ is a random variable with mean and variance, then
$$\min\limits_{c\in\mathbb{R}}\mathbb{E}((X - c)^{2}) = \mathbb{E}((X-\mathbb{E}(X))^2).$$ I.e., the expected value $c=\mathbb{E}(X)$ minimizes $\mathbb{E}((X - c)^{2}).$
My question is how to prove it?