To find the variance, follow these steps:
- Calculate the mean (average) of the data set by adding all data values and dividing by the number of values.
- Find the deviation of each data point from the mean by subtracting the mean from each value.
- Square each deviation to remove negative values and emphasize larger deviations.
- Calculate the average of these squared deviations:
- For a population variance, divide the sum of squared deviations by the population size NNN.
- For a sample variance, divide by the sample size minus one n−1n-1n−1 to account for sample bias.
The formulas are:
- Population variance: $$
\sigma^2 = \frac{1}{N} \sum_{i=1}^N (x_i - \mu)^2
-Samplevariance:$$ s^2=\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar{x})^2
Where x_i are data points, \mu is the population mean, and \bar{x} is the sample mean. Variance measures how spread out the data points are around the mean. Squaring deviations emphasizes larger differences.