Calculate the variance of a dataset to measure how widely the values are spread around the mean. Choose between sample and population variance.