1. Variance of small integers
Problem
Calculate the mean by summing all values and dividing by the count.
Find the squared distance of each value from the mean.
Add up all the squared deviations.
Divide the sum by the total number of values .
Answer:
We calculated the mean first, then found how far each point deviates from that mean (squared to keep all values positive), summed those squared distances, and divided by the total count, which gives the average squared deviation.