Variance measures spread around the mean:
Var(X) = Σ(x-μ)²·P(x)
Each squared deviation is weighted by its probability.
Example
Use weighted squared deviations from the mean.
highlighted = computed this step
Step 1 — Mean
Start with the mean.
Step 2 — First weighted square
Compute deviation, square, and weighted term.
x012P412141dev−1□□sq1□□term41□□
Step 3 — Second weighted square
Compute deviation, square, and weighted term.
x012P412141dev−10□sq10□term410□
Step 4 — Third weighted square
Compute deviation, square, and weighted term.
x012P412141dev−101sq101term41041
Step 5 — Variance
Add weighted square terms for variance.
Var(X)=41+0+41=21
variance-of-random-variable
Var(X) = Σ(x-μ)²·P(x)