If X is a random variable with Mean μ, then the variance of X, denoted by Var (X) is given by:
We can see that complete solution: write formula, plug data, do arithmetic. Final value matches Var (X) = E[(X - μ)]². Simple and accurate.
Ref: NCERT Mathematics Class XII — Probability