var_samp

Computes the statistical variance of a sample consisting of a numeric-expression, as a double, and returns the variance of a set of numbers. var and variance are aliases of var_samp, and use the same syntax.

Syntax

var_samp ( [ all | distinct] expression )

Parameters

Examples

Usage

var_samp returns a result of double-precision floating-point datatype. If applied to the empty set, the result is NULL.

Formula for Sample-Related Statistical Aggregate Functions
The formula for sample-related statistical aggregate functions.

For general information about aggregate functions, see Aggregate Functions in Transact-SQL Users Guide.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute var_samp.

Related reference
stddev_pop
stddev_samp
var_pop