Sample variance and standard deviation
The sample variance of given numbers
, is defined as
![]()
where
is the sample average of
. The sample variance is a measure of the deviations of the numbers
with respect to the average value
.
The sample standard deviation is the square root of the sample variance,
. It can be expressed in terms of the Euclidean norm of the vector
, as
![]()
where
denotes the Euclidean norm.
More generally, for any vector
, with
for every
, and
, we can define the corresponding weighted variance as

The interpretation of
is in terms of a discrete probability distribution of a random variable
, which takes the value
with probability
,
. The weighted variance is then simply the expected value of the squared deviation of
from its mean
, under the probability distribution
.
See also: Sample and weighted average.