Skip to main content

varPop

Introduced in: v1.1.0 Calculates the population variance. The population variance is calculated using the formula: Σ(xxˉ)2n\frac{\Sigma{(x - \bar{x})^2}}{n}
Where:
  • xx is each value in the population
  • xˉ\bar{x} is the population mean
  • nn is the population size
This function uses a numerically unstable algorithm. If you need numerical stability in calculations, use the varPopStable function. It works slower but provides a lower computational error.
Syntax
Aliases: VAR_POP Arguments Returned value Returns the population variance of x. Float64 Examples Computing population variance
Query
Response
Last modified on July 2, 2026