Variance from a Distribution Interview Questions
Variance from a distribution interview prep for spread around the mean, E[X^2] minus E[X]^2, table examples, and common formula mistakes.
Candidates preparing for variance and distribution-table questions.
Variance measures spread
Variance measures average squared distance from the mean. It is about spread, not the central value itself.
Useful formula
A common interview shortcut is Var(X) = E[X^2] - E[X]^2. Compute the second moment and subtract the square of the mean.
Concrete example
If X is 0 or 2 with equal probability, E[X] is 1 and E[X^2] is 2. The variance is 2 - 1^2 = 1.
Table workflow
For a distribution table, add a column for x times probability and another for x squared times probability. This keeps the arithmetic visible.
Connection to conditioning
When information arrives, both the mean and variance may change. Recompute the distribution under the condition before computing variance.
Common mistakes
Candidates often compute E[X^2] and stop. Variance requires subtracting the square of the mean.
Practice the pattern
Use the LeetQuidity curriculum and calibration to turn this topic into a focused practice plan.