derivation for expected value for variance
Hi Im taking a course about probability distribution in datascience and below is derivation of the expected value for the variance
- Variance = expected value of the squared difference from mean for any value. But generally, variance is just the difference between the value and its mean.
Why are we squaring and adding the expected value symbol?
$$\sigma^2 = E((Y - \mu)^2) = E(Y^2) - \mu^2$$
For the first step in derivation, why do we multiply the summation of $p(x)$ with $(x - \mu)^2$?
How is this substitution valid? I cannot understand it. I know that $E(X)=p(X).X$
$E(X^2) = \sum P(X)*X^2$
Topic variance distribution probability
Category Data Science