The Variance function computes the statistical variance of a column or group. It is a measure of dispersion or how far the set of observations (numbers) varies from the mean and is calculated as the average squared differences from the mean. A small variance suggests the data points tend to be close to the mean and from one another, whereas a high variance suggests the data points tend to lie farther from the mean and from one another.
- column (required) - The column of numbers to calculate the variance of. Any
nullvalues are skipped.
The underlying formula is as follows:
where x_i is the value of one observation, x is the mean value of all observations, and n is the number of observations (sample size).
- Return the sample variance of non-null records in the x column for each group K.