This is a standard derivation that you can find in any textbook.
You have to know that μ = E(X) = Σ pᵢxᵢ where i = 1 to n.
Also know that E(X²) = Σ pᵢxᵢ² and also Σ pᵢ = 1
With that under your belt, the rest is just simple algebra and using some facts about summations
For example Σ μ = nμ where you sum from 1 to n,.
So E(x–μ)² = Σ pᵢ(xᵢ –μ) ² = Σ pᵢ(xᵢ² – 2μxᵢ + μ²) =
Σ pᵢ(xᵢ²) – 2μ Σ pᵢxᵢ + Σ pᵢ μ² =
E(X²) – 2μμ + μ² •1 =
E(X²) – μ²
(SInce– 2μμ + μ² •1 = – 2u² + μ² = – μ² )
You have to know that μ = E(X) = Σ pᵢxᵢ where i = 1 to n.
Also know that E(X²) = Σ pᵢxᵢ² and also Σ pᵢ = 1
With that under your belt, the rest is just simple algebra and using some facts about summations
For example Σ μ = nμ where you sum from 1 to n,.
So E(x–μ)² = Σ pᵢ(xᵢ –μ) ² = Σ pᵢ(xᵢ² – 2μxᵢ + μ²) =
Σ pᵢ(xᵢ²) – 2μ Σ pᵢxᵢ + Σ pᵢ μ² =
E(X²) – 2μμ + μ² •1 =
E(X²) – μ²
(SInce– 2μμ + μ² •1 = – 2u² + μ² = – μ² )