Sample mean and sample covariance

Sample mean and sample covariance

Sample mean and sample covariance are statistics computed from a collection of data, thought of as being random.

ample mean and covariance

Given a random sample $extstyle mathbf\left\{x\right\}_\left\{1\right\},ldots,mathbf\left\{x\right\}_\left\{N\right\}$ from an $extstyle n$-dimensional random variable $extstyle mathbf\left\{X\right\}$ (i.e., realizations of $extstyle N$ independent random variables with the same distribution as $extstyle mathbf\left\{X\right\}$), the sample mean is

:

In coordinates, writing the vectors as columns,

:

the entries of the sample mean are

:

The sample covariance of $extstyle mathbf\left\{x\right\}_\left\{1\right\},ldots,mathbf\left\{x\right\}_\left\{N\right\}$ is the $extstyle n$ by $extstyle n$ matrix $extstyle mathbf\left\{Q\right\}=left \left[ q_\left\{ij\right\} ight\right]$ with the entries given by

:

The sample mean and the sample covariance matrix are unbiased estimates of the mean and the covariance matrix of the random variable $extstyle mathbf\left\{X\right\}$. The reason why the sample covariance matrix has $extstyle N-1$ in the denominator rather than $extstyle N$ is essentially that the population mean $E\left(X\right)$ is not known and is replaced by the sample mean . If the population mean $E\left(X\right)$ is known, the analogous unbiased estimate

:$q_\left\{ij\right\}=frac\left\{1\right\}\left\{N\right\}sum_\left\{k=1\right\}^\left\{N\right\}left\left( x_\left\{ik\right\}-E\left(X_i\right) ight\right) left\left( x_\left\{jk\right\}-E\left(X_j\right) ight\right)$

with the population mean indeed does have $extstyle N$. This is an example why in probability and statistics it is essential to distinguish between upper case letters (random variables) and lower case letters (realizations of the random variables).

The maximum likelihood estimate of the covariance

:

for the Gaussian distribution case has $extstyle N$ as well. The difference of course diminishes for large $extstyle N$.

Weighted samples

In a weighted sample, each vector $extstyle extbf\left\{x\right\}_\left\{k\right\}$ is assigned a weight $extstyle w_\left\{k\right\}geq0$. Without loss of generality, assume that the weights are normalized:

:$sum_\left\{k=1\right\}^\left\{N\right\}w_\left\{k\right\}=1.$

(If they are not, divide the weights by their sum.)Then the weighted mean and the weighted covariance matrix $extstyle mathbf\left\{Q\right\}=left \left[ q_\left\{ij\right\} ight\right]$ are given by

:

and Mark Galassi, Jim Davies, James Theiler, Brian Gough, Gerard Jungman, Michael Booth, and Fabrice Rossi. [http://www.gnu.org/software/gsl/manual GNU Scientific Library - Reference manual, Version 1.9] , 2007. [http://www.gnu.org/software/gsl/manual/html_node/Weighted-Samples.html Sec. 20.6 Weighted Samples] ]

:

If all weights are the same, $extstyle w_\left\{k\right\}=1/N$, the weighted mean and covariance reduce to the sample mean and covariance above.

References

ee also

*Unbiased estimation of standard deviation
*Estimation of covariance matrices
*Scatter matrix
*Arithmetic mean
*Estimation theory
*Linear regression
*Weighted least squares
*Weighted mean
*Standard error (statistics)

Wikimedia Foundation. 2010.

Look at other dictionaries:

• Mean and predicted response — In linear regression mean response and predicted response are values of the dependent variable calculated from the regression parameters and a given value of the independent variable. The values of these two responses are the same, but their… …   Wikipedia

• Covariance — This article is about the measure of linear relation between random variables. For other uses, see Covariance (disambiguation). In probability theory and statistics, covariance is a measure of how much two variables change together. Variance is a …   Wikipedia

• Sample size determination — is the act of choosing the number of observations to include in a statistical sample. The sample size is an important feature of any empirical study in which the goal is to make inferences about a population from a sample. In practice, the sample …   Wikipedia

• Mean — This article is about the statistical concept. For other uses, see Mean (disambiguation). In statistics, mean has two related meanings: the arithmetic mean (and is distinguished from the geometric mean or harmonic mean). the expected value of a… …   Wikipedia

• Sample (statistics) — In statistics, a sample is a subset of a population. Typically, the population is very large, making a census or a complete enumeration of all the values in the population impractical or impossible. The sample represents a subset of manageable… …   Wikipedia

• Estimation of covariance matrices — In statistics, sometimes the covariance matrix of a multivariate random variable is not known but has to be estimated. Estimation of covariance matrices then deals with the question of how to approximate the actual covariance matrix on the basis… …   Wikipedia

• Correlation and dependence — This article is about correlation and dependence in statistical data. For other uses, see correlation (disambiguation). In statistics, dependence refers to any statistical relationship between two random variables or two sets of data. Correlation …   Wikipedia

• Arithmetic mean — In mathematics and statistics, the arithmetic mean, often referred to as simply the mean or average when the context is clear, is a method to derive the central tendency of a sample space. The term arithmetic mean is preferred in mathematics and… …   Wikipedia

• Errors and residuals in statistics — For other senses of the word residual , see Residual. In statistics and optimization, statistical errors and residuals are two closely related and easily confused measures of the deviation of a sample from its theoretical value . The error of a… …   Wikipedia

• Glossary of probability and statistics — The following is a glossary of terms. It is not intended to be all inclusive. Concerned fields *Probability theory *Algebra of random variables (linear algebra) *Statistics *Measure theory *Estimation theory Glossary *Atomic event : another name… …   Wikipedia