"

The sample variance of given numbers [latex]x_1, \cdots, x_n[/latex], is defined as

[latex]\begin{align*} \sigma^2 &:= \frac{1}{n} ((x_1 -\hat{x})^2 + \cdots + (x_n - \hat{x})^2), \end{align*}[/latex]

where [latex]\hat{x}[/latex] is the sample average of [latex]x_1, \cdots, x_n[/latex]. The sample variance is a measure of the deviations of the numbers [latex]x_i[/latex] with respect to the average value [latex]\hat{x}[/latex].

The sample standard deviation is the square root of the sample variance, [latex]\sigma^2[/latex]. It can be expressed in terms of the Euclidean norm of the vector [latex]x = (x_1, \cdots, x_n)[/latex], as

[latex]\begin{align*} \sigma &= \frac{1}{\sqrt{n}}\|x-\hat{x}{\bf 1}\|_2, \end{align*}[/latex]

where [latex]||\cdot||_2[/latex] denotes the Euclidean norm.

More generally, for any vector [latex]p \in \mathbb{R}^n[/latex], with [latex]p_i \ge 0[/latex] for every [latex]i[/latex], and [latex]p_1 + \cdots + p_n = 1[/latex], we can define the corresponding weighted variance as

[latex]\begin{align*} \sum\limits_{i=1}^n p_i(x_i - \hat{x})^2. \end{align*}[/latex]

The interpretation of [latex]p[/latex] is in terms of a discrete probability distribution of a random variable [latex]X[/latex], which takes the value [latex]x_i[/latex] with probability [latex]p_i[/latex], [latex]i = 1, \cdots, n[/latex]. The weighted variance is then simply the expected value of the squared deviation of [latex]X[/latex] from its mean [latex]{\bf E}(X)[/latex], under the probability distribution [latex]p[/latex].

See also: sample and weighted average.

License

Icon for the Public Domain license

This work (Đại số tuyến tính by Tony Tin) is free of known copyright restrictions.