The variance is a measure of variability. It is calculated by taking the average of squared deviations from the mean. Show
Variance tells you the degree of spread in your data set. The more spread the data, the larger the variance is in relation to the mean. Variance vs standard deviationThe standard deviation is derived from variance and tells you, on average, how far each value lies from the mean. It’s the square root of variance. Both measures reflect variability in a distribution, but their units differ:
Since the units of variance are much larger than those of a typical value of a data set, it’s harder to interpret the variance number intuitively. That’s why standard deviation is often preferred as a main measure of variability. However, the variance is more informative about variability than the standard deviation, and it’s used in making statistical inferences. Population vs sample varianceDifferent formulas are used for calculating variance depending on whether you have data from a whole population or a sample. Population varianceWhen you have collected data from every member of the population that you’re interested in, you can get an exact value for population variance. The population variance formula looks like this:
Sample varianceWhen you collect data from a sample, the sample variance is used to make estimates or inferences about the population variance. The sample variance formula looks like this:
With samples, we use n – 1 in the formula because using n would give us a biased estimate that consistently underestimates variability. The sample variance would tend to be lower than the real variance of the population. Reducing the sample n to n – 1 makes the variance artificially large, giving you an unbiased estimate of variability: it is better to overestimate rather than underestimate variability in samples. It’s important to note that doing the same thing with the standard deviation formulas doesn’t lead to completely unbiased estimates. Since a square root isn’t a linear operation, like addition or subtraction, the unbiasedness of the sample variance formula doesn’t carry over the sample standard deviation formula. Steps for calculating the varianceThe variance is usually calculated automatically by whichever software you use for your statistical analysis. But you can also calculate it by hand to better understand how the formula works. There are five main steps for finding the variance by hand. We’ll use a small data set of 6 scores to walk through the steps.
Step 1: Find the meanTo find the mean, add up all the scores, then divide them by the number of scores.
Step 2: Find each score’s deviation from the meanSubtract the mean from each score to get the deviations from the mean. Since x̅ = 50, take away 50 from each score.
Step 3: Square each deviation from the meanMultiply each deviation from the mean by itself. This will result in positive numbers.
Step 4: Find the sum of squaresAdd up all of the squared deviations. This is called the sum of squares.
Step 5: Divide the sum of squares by n – 1 or NDivide the sum of the squares by n – 1 (for a sample) or N (for a population). Since we’re working with a sample, we’ll use n – 1, where n = 6.
Why does variance matter?Variance matters for two main reasons:
Homogeneity of variance in statistical testsVariance is important to consider before performing parametric tests. These tests require equal or similar variances, also called homogeneity of variance or homoscedasticity, when comparing different samples. Uneven variances between samples result in biased and skewed test results. If you have uneven variances across samples, non-parametric tests are more appropriate. Using variance to assess group differencesStatistical tests like variance tests or the analysis of variance (ANOVA) use sample variance to assess group differences. They use the variances of the samples to assess whether the populations they come from differ from each other. Research exampleAs an education researcher, you want to test the hypothesis that different frequencies of quizzes lead to different final scores of college students. You collect the final scores from three groups with 20 students each that had quizzes frequently, infrequently, or rarely over a semester.
To assess group differences, you perform an ANOVA. The main idea behind an ANOVA is to compare the variances between groups and variances within groups to see whether the results are best explained by the group differences or by individual differences. If there’s higher between-group variance relative to within-group variance, then the groups are likely to be different as a result of your treatment. If not, then the results may come from individual differences of sample members instead. Research exampleYour ANOVA assesses whether the differences in mean final scores between groups come from the differences in the frequency of quizzes or the individual differences of the students in each group.To do so, you get a ratio of the between-group variance of final scores and the within-group variance of final scores – this is the F-statistic. With a large F-statistic, you find the corresponding p-value, and conclude that the groups are significantly different from each other. Frequently asked questions about varianceWhat is homoscedasticity?
Homoscedasticity, or homogeneity of variances, is an assumption of equal or similar variances in different groups being compared. This is an important assumption of parametric statistical tests because they are sensitive to any dissimilarities. Uneven variances in samples result in biased and skewed test results. |