Sample variance and standard deviation

The sample variance of given numbers x_1, \cdots, x_n, is defined as

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

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

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

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

where ||\cdot||_2 denotes the Euclidean norm.

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

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

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

See also: Sample and weighted average.

License

Icon for the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

Linear Algebra and Applications Copyright © 2023 by VinUiversity is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, except where otherwise noted.

Share This Book