Aggregate. Computes the statistical variance of a sample consisting of a numeric-expression, as a float.
var_samp ( numeric-expression )
numeric-expression | A set of rows. expression is commonly a column name. |
This function converts its argument to float, performs the computation in double-precision floating point, and returns a float. The variance (s2) of numeric-expression (x) is computed according to this formula, which assumes a normal distribution:
This variance does not include rows where numeric-expression is NULL. The function returns NULL for a group containing either 0 or 1 rows.
The variance of a sample could be used as a measure of assessing risk for a specific portfolio.