VARIANCE/VAR_SAMP
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Computes the sample variance of input values.
<expression>: An expression of any numerical type.
NUMERIC(38,6)for integer-type or numeric arguments.double precisionfor floating-point arguments.
Returns NULL if the computation is meaningless.
- Uses N-1 in the denominator (Bessel's correction).
- Variance is the square of the standard deviation.
- Use
VAR_POPfor population variance. - Cast the input to
double precisionto get adouble precisionresult.
Find the variance of prices.
Calculate variance for each category.