From the course: SQL for Statistics Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Variance and standard deviation

Variance and standard deviation

- [Teacher] Variance and standard deviation are statistics that measure how spread out a set of numbers are from the average of those numbers. Both are based on the distance between the mean, or the average, and each of the numbers in the population that we use to calculate that mean. Let's look at an example. Let's select the month of year, the sum of the units sold in that month, the average of the units sold. Now, let's get a sense of how spread out the various numbers are from the average by using a function called var_pop, which is short for variance of the population. And we're going to get the variance of units sold. And of course, we'll select from the store-sales table and we will group by month of year. Now what we see here is that we have the month of year in the first column, the total numbers sold in the second column, the average, this case it would be the daily average, of unit sold, and then we have this fourth number called the variance of the population. Now this is…

Contents