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.

Sigma calls the underlying Cloud Data Warehouse's Variance function that uses the statistical sample definition. Check the documentation of the database you use for details on the function called.



Function arguments:

  • column (required) - The column of numbers to calculate the variance of. Any null values 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.

Screenshot 2023-07-26 at 12.36.52 AM.png


Related Functions

Was this page helpful?
Yes No