List of statistics articles: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Noiseball
en>MusikAnimal
m Reverted edits by 174.237.35.18 (talk) (HG)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Image:Gaussian-2d.png|thumb|right|A [[multivariate Gaussian distribution|bivariate Gaussian probability density function]] centered at (0, 0), with covariance matrix [ 1.00, 0.50 ; 0.50, 1.00 ]. ]]
Eusebio Stanfill is what's written on my birth certificate although it is in no way the name on the little birth certificate. Idaho is our birth install. I work as an arrangement clerk. As a man what My husband and i really like is conducting but I'm thinking towards starting something new. You will be able to find my website here: http://prometeu.net<br><br>Look into my web blog; [http://prometeu.net clash of clans hack download free]
 
[[Image:GaussianScatterPCA.png|thumb|right|Sample points from a [[multivariate Gaussian distribution]] with a standard deviation of 3 in roughly the lower left-upper right direction and of 1 in the orthogonal direction. Because the ''x'' and ''y'' components co-vary, the variances of ''x'' and ''y'' do not fully describe the distribution. A 2&times;2 covariance matrix is needed; the directions of the arrows correspond to the eigenvectors of this covariance matrix and their lengths to the square roots of the [[eigenvalues]].]]
 
In [[probability theory]] and [[statistics]], a '''covariance matrix''' (also known as '''dispersion matrix''' or '''variance–covariance matrix''') is a [[Matrix (mathematics)|matrix]] whose element in the ''i'', ''j'' position is the [[covariance]] between the ''i''&nbsp;<sup>th</sup> and ''j''&nbsp;<sup>th</sup> elements of a [[random vector]] (that is, of a [[Euclidean vector|vector]] of [[random variable]]s). Each element of the vector is a [[Scalar (mathematics)|scalar]] random variable, either with a finite number of observed empirical values or with a finite or infinite number of potential values specified by a theoretical [[joint probability distribution]] of all the random variables.
 
Intuitively, the covariance matrix generalizes the notion of [[variance]] to multiple dimensions. As an example, the variation in a collection of random points in two-dimensional space cannot be characterized fully by a single number, nor would the variances in the ''x'' and ''y'' directions contain all of the necessary information; a 2&times;2 matrix would be necessary to fully characterize the two-dimensional variation.
 
== Definition ==
 
Throughout this article, boldfaced unsubscripted '''X''' and '''Y''' are used to refer to random vectors, and unboldfaced subscripted X<sub>i</sub> and Y<sub>i</sub>  are used to refer to random scalars.
 
If the entries in the [[column vector]]
 
:<math> \mathbf{X} = \begin{bmatrix}X_1 \\  \vdots \\ X_n \end{bmatrix}</math>
 
are [[random variable]]s, each with finite [[variance]], then the covariance matrix Σ is the matrix whose (''i'',&nbsp;''j'') entry is the [[covariance]]
 
:<math>
\Sigma_{ij}
= \mathrm{cov}(X_i, X_j) = \mathrm{E}\begin{bmatrix}
(X_i - \mu_i)(X_j - \mu_j)
\end{bmatrix}
</math>
 
where
 
: <math>
\mu_i = \mathrm{E}(X_i)\,
</math>
 
is the [[expected value]] of the ''i''th entry in the vector '''X'''.  In other words, we have
 
: <math>
\Sigma
= \begin{bmatrix}
\mathrm{E}[(X_1 - \mu_1)(X_1 - \mu_1)] & \mathrm{E}[(X_1 - \mu_1)(X_2 - \mu_2)] & \cdots & \mathrm{E}[(X_1 - \mu_1)(X_n - \mu_n)] \\ \\
\mathrm{E}[(X_2 - \mu_2)(X_1 - \mu_1)] & \mathrm{E}[(X_2 - \mu_2)(X_2 - \mu_2)] & \cdots & \mathrm{E}[(X_2 - \mu_2)(X_n - \mu_n)] \\ \\
\vdots & \vdots & \ddots & \vdots \\ \\
\mathrm{E}[(X_n - \mu_n)(X_1 - \mu_1)] & \mathrm{E}[(X_n - \mu_n)(X_2 - \mu_2)] & \cdots & \mathrm{E}[(X_n - \mu_n)(X_n - \mu_n)]
\end{bmatrix}.
</math>
 
The inverse of this matrix, <math>\Sigma^{-1}</math> is the '''inverse covariance matrix''', also known as the '''concentration matrix''' or '''precision matrix''';<ref>{{cite book | title=All of Statistics: A Concise Course in Statistical Inference | first=Larry | last=Wasserman | year=2004 | isbn=0-387-40272-1}}</ref> see [[precision (statistics)]]. The elements of the precision matrix have an interpretation in terms of [[partial correlation]]s and [[partial variance]]s.{{Citation needed|date=February 2012}}
 
=== Generalization of the variance ===
 
The definition above is equivalent to the matrix equality
 
:<math>
\Sigma=\mathrm{E}
\left[
\left(
\textbf{X} - \mathrm{E}[\textbf{X}]
\right)
\left(
\textbf{X} - \mathrm{E}[\textbf{X}]
\right)^{\rm T}
\right]
</math>
 
This form can be seen as a generalization of the scalar-valued [[variance]] to higher dimensions.  Recall that for a scalar-valued random variable ''X''
 
:<math>
\sigma^2 = \mathrm{var}(X_i)
= \mathrm{E}[(X_i-\mathrm{E}(X_i))^2] = \mathrm{E}[(X_i-\mathrm{E}(X_i))\cdot(X_i-\mathrm{E}(X_i))].\,
</math>
 
Indeed, the entries on the diagonal of the covariance matrix <math>\Sigma</math> are the variances of each element of the vector <math>\mathbf{X}</math>.
 
=== Correlation matrix ===
A quantity closely related to the covariance matrix is the correlation matrix, the matrix of [[Pearson product-moment correlation coefficient]]s between each of the random variables in the random vector <math>\mathbf{X}</math>, which can be written
:<math>\rho_{ij} = \left(\Sigma^{\mathrm{(diag)}}\right)^{-\frac{1}{2}} \, \Sigma \, \left(\Sigma^{\mathrm{(diag)}}\right)^{-\frac{1}{2}}</math>
where <math>\Sigma^{\mathrm{(diag)}}</math> is the matrix of diagonal elements of <math>\Sigma</math> (i.e. a diagonal matrix of each of the variances of ''X''<sub>''i''</sub>).
 
Equivalently, the correlation matrix can be seen as the covariance matrix of the [[standardized variable|standardized random variables]] ''X''<sub>''i''</sub> / σ (''X''<sub>i</sub>) for ''i'' = 1, ..., ''n''.
 
==Conflicting nomenclatures and notations==
Nomenclatures differ. Some statisticians, following the probabilist [[William Feller]], call the matrix <math>\Sigma</math> the '''variance''' of the random vector <math>X</math>, because it is the natural generalization to higher dimensions of the 1-dimensional variance. Others call it the '''covariance matrix''', because it is the matrix of covariances between the scalar components of the vector <math>X</math>.  Thus
:<math>
\operatorname{var}(\textbf{X})
=
\operatorname{cov}(\textbf{X})
=
\mathrm{E}
\left[
(\textbf{X} - \mathrm{E} [\textbf{X}])
(\textbf{X} - \mathrm{E} [\textbf{X}])^{\rm T}
\right].
</math>
 
However, the notation for the [[cross-covariance]] ''between'' two vectors is standard:
:<math>
\operatorname{cov}(\textbf{X},\textbf{Y})
=
\mathrm{E}
\left[
(\textbf{X} - \mathrm{E}[\textbf{X}])
(\textbf{Y} - \mathrm{E}[\textbf{Y}])^{\rm T}
\right].
</math>
 
The var notation is found in William Feller's two-volume book ''An Introduction to Probability Theory and Its Applications'',<ref name="Feller1971">{{cite book|author=William Feller|title=An introduction to probability theory and its applications|url=http://books.google.com/books?id=K7kdAQAAMAAJ|accessdate=10 August 2012|year=1971|publisher=Wiley|isbn=978-0-471-25709-7}}</ref> but both forms are quite standard and there is no ambiguity between them.
 
The matrix <math>\Sigma</math> is also often called the variance-covariance matrix since the diagonal terms are in fact variances.
 
== Properties ==
For <math>\Sigma=\mathrm{E} \left[ \left( \textbf{X} - \mathrm{E}[\textbf{X}] \right) \left( \textbf{X} - \mathrm{E}[\textbf{X}] \right)^{\rm T} \right]</math> and <math> \boldsymbol{\mu} = \mathrm{E}(\textbf{X})</math>, where '''X''' is a random ''p''-dimensional variable and '''Y''' a random  ''q''-dimensional variable, the following basic properties apply:<ref name=taboga>{{cite web | last1 = Taboga | first1 = Marco | chapterurl = http://www.statlect.com/varian2.htm | chapter = Covariance matrix | title = Lectures on probability theory and mathematical statistics | year=2010}}</ref>
# <math> \Sigma = \mathrm{E}(\mathbf{X X^{\rm T}}) - \boldsymbol{\mu}\boldsymbol{\mu}^{\rm T} </math>
# <math> \Sigma \,</math> is [[Positive-semidefinite matrix|positive-semidefinite]] and [[symmetric matrix|symmetric]].
# <math> \operatorname{cov}(\mathbf{A X} + \mathbf{a}) = \mathbf{A}\, \operatorname{cov}(\mathbf{X})\, \mathbf{A^{\rm T}} </math>
# <math> \operatorname{cov}(\mathbf{X},\mathbf{Y}) = \operatorname{cov}(\mathbf{Y},\mathbf{X})^{\rm T}</math>
# <math> \operatorname{cov}(\mathbf{X}_1 + \mathbf{X}_2,\mathbf{Y}) = \operatorname{cov}(\mathbf{X}_1,\mathbf{Y}) + \operatorname{cov}(\mathbf{X}_2, \mathbf{Y})</math>
# If ''p'' = ''q'', then <math>\operatorname{var}(\mathbf{X} + \mathbf{Y}) = \operatorname{var}(\mathbf{X}) + \operatorname{cov}(\mathbf{X},\mathbf{Y}) + \operatorname{cov}(\mathbf{Y}, \mathbf{X}) + \operatorname{var}(\mathbf{Y})</math>
# <math>\operatorname{cov}(\mathbf{AX} + \mathbf{a}, \mathbf{B}^{\rm T}\mathbf{Y} + \mathbf{b}) = \mathbf{A}\, \operatorname{cov}(\mathbf{X}, \mathbf{Y}) \,\mathbf{B}</math>
# If <math>\mathbf{X}</math> and <math>\mathbf{Y}</math> are independent or uncorrelated, then <math>\operatorname{cov}(\mathbf{X}, \mathbf{Y}) = \mathbf{0}</math>
 
where <math>\mathbf{X}, \mathbf{X}_1</math> and <math>\mathbf{X}_2</math> are random ''p''×1 vectors, <math>\mathbf{Y}</math> is a random ''q''×1 vector, <math>\mathbf{a}</math> is a ''q''×1 vector, <math>\mathbf{b}</math> is a ''p''×1 vector, and <math>\mathbf{A}</math> and <math>\mathbf{B}</math> are ''q''×''p'' matrices.
 
This covariance matrix is a useful tool in many different areas. From it a [[transformation matrix]] can be derived, called a [[whitening transformation]], that allows one to completely decorrelate the data{{Citation needed|date=February 2012}} or, from a different point of view, to find an optimal basis for representing the data in a compact way{{Citation needed|date=February 2012}} (see [[Rayleigh quotient]] for a formal proof and additional properties of covariance matrices).
This is called [[principal components analysis]] (PCA) and the [[Karhunen-Loève transform]] (KL-transform).
 
=== Block matrices ===
The joint mean <math>\boldsymbol\mu_{X,Y}</math>  and joint covariance matrix <math>\boldsymbol\Sigma_{X,Y}</math> of <math>\boldsymbol{X}</math> and <math>\boldsymbol{Y}</math> can be written in block form
 
:<math>
\boldsymbol\mu_{X,Y}
=
\begin{bmatrix}
\boldsymbol\mu_X \\
\boldsymbol\mu_Y
\end{bmatrix}, \qquad
\boldsymbol\Sigma_{X,Y}
=
\begin{bmatrix}
\boldsymbol\Sigma_{\mathit{XX}} & \boldsymbol\Sigma_{\mathit{XY}} \\
\boldsymbol\Sigma_{\mathit{YX}} & \boldsymbol\Sigma_{\mathit{YY}}
\end{bmatrix}
</math>
 
where <math>\boldsymbol\Sigma_{XX} = \mbox{var}(\boldsymbol{X}), \boldsymbol\Sigma_{YY} = \mbox{var}(\boldsymbol{Y}),</math> and <math>\boldsymbol\Sigma_{XY} = \boldsymbol\Sigma^T_{\mathit{YX}} = \mbox{cov}(\boldsymbol{X}, \boldsymbol{Y})</math>.
 
<math>\boldsymbol\Sigma_{XX}</math> and <math>\boldsymbol\Sigma_{YY}</math> can be identified as the variance matrices of the [[marginal distribution]]s for <math>\boldsymbol{X}</math> and <math>\boldsymbol{Y}</math> respectively.
 
If <math>\boldsymbol{X}</math> and <math>\boldsymbol{Y}</math> are [[Multivariate normal distribution|jointly normally distributed]],
:<math>
\boldsymbol{x}, \boldsymbol{y}  \sim\ \mathcal{N}(\boldsymbol\mu_{X,Y}, \boldsymbol\Sigma_{X,Y})
</math>,
then the [[conditional distribution]] for <math>\boldsymbol{Y}</math> given <math>\boldsymbol{X}</math> is given by
:<math>
\boldsymbol{y}|\boldsymbol{x}  \sim\ \mathcal{N}(\boldsymbol\mu_{Y|X}, \boldsymbol\Sigma_{Y|X})
</math>,<ref name=eaton>{{cite book|last=Eaton|first=Morris L.|title=Multivariate Statistics: a Vector Space Approach|year=1983|publisher=John Wiley and Sons|isbn=0-471-02776-6|pages=116–117}}</ref>
defined by [[conditional mean]]
:<math>
\boldsymbol\mu_{Y|X}
=
\boldsymbol\mu_Y + \boldsymbol\Sigma_{YX} \boldsymbol\Sigma_{XX}^{-1}
\left(
\mathbf{x} - \boldsymbol\mu_X
\right)
</math>
 
and [[conditional variance]]
:<math>
\boldsymbol\Sigma_{Y|X}
=
\boldsymbol\Sigma_{YY} - \boldsymbol\Sigma_{\mathit{YX}} \boldsymbol\Sigma_{\mathit{XX}}^{-1} \boldsymbol\Sigma_{\mathit{XY}}.
</math>
 
The matrix '''Σ'''<sub>YX</sub>'''Σ'''<sub>XX</sub><sup>−1</sup> is known as the matrix of [[regression analysis|regression]] coefficients, while in linear algebra '''Σ'''<sub>Y|X</sub> is the [[Schur complement]] of '''Σ'''<sub>XX</sub> in '''Σ'''<sub>X,Y</sub>
 
The matrix of regression coefficients may often be given in transpose form, '''Σ'''<sub>XX</sub><sup>−1</sup>'''Σ'''<sub>XY</sub>, suitable for post-multiplying a row vector of explanatory variables '''''x'''''<sup>T</sup> rather than pre-multiplying a column vector '''''x'''''. In this form they correspond to the coefficients obtained by inverting the matrix of the [[normal equations]] of [[ordinary least squares]] (OLS).
 
==As a linear operator==
Applied to one vector, the covariance matrix maps a linear combination, '''c''', of the random variables, '''X''', onto a vector of covariances with those variables: <math>\mathbf c^{\rm T}\Sigma = \operatorname{cov}(\mathbf c^{\rm T}\mathbf X,\mathbf X)</math>.  Treated as a [[bilinear form]], it yields the covariance between the two linear combinations: <math>\mathbf d^{\rm T}\Sigma\mathbf c=\operatorname{cov}(\mathbf d^{\rm T}\mathbf X,\mathbf c^{\rm T}\mathbf X)</math>. The variance of a linear combination is then <math>\mathbf c^{\rm T}\Sigma\mathbf c</math>, its covariance with itself.
 
Similarly, the (pseudo-)inverse covariance matrix provides an inner product, <math>\langle c-\mu|\Sigma^+|c-\mu\rangle</math> which induces the [[Mahalanobis distance]], a measure of the "unlikelihood" of ''c''.{{Citation needed|date=February 2012}}
 
==Which matrices are covariance matrices?==
 
From the identity just above, let <math>\mathbf{b}</math> be a <math>(p \times 1)</math> real-valued vector, then
 
:<math>\operatorname{var}(\mathbf{b}^{\rm T}\mathbf{X}) = \mathbf{b}^{\rm T} \operatorname{var}(\mathbf{X}) \mathbf{b},\,</math>
 
which must always be nonnegative since it is the [[variance#Properties|variance]] of a real-valued random variable. and the symmetry of the covariance matrix's definition it follows that only a [[positive-semidefinite matrix]] can be a covariance matrix.{{Citation needed|date=February 2012}}  Conversely, every symmetric positive semi-definite matrix is a covariance matrix.  To see this, suppose '''M''' is a ''p''&times;''p'' positive-semidefinite matrix. From the finite-dimensional case of the [[spectral theorem]], it follows that '''M''' has a nonnegative symmetric [[Square root of a matrix|square root]], that can be denoted by '''M'''<sup>1/2</sup>.  Let <math>\mathbf{X}</math> be any ''p''&times;1 column vector-valued random variable whose covariance matrix is the ''p''&times;''p'' identity matrix.  Then
 
:<math>\operatorname{var}(\mathbf{M}^{1/2}\mathbf{X}) = \mathbf{M}^{1/2} (\operatorname{var}(\mathbf{X})) \mathbf{M}^{1/2} = \mathbf{M}.\,</math>
 
==How to find a valid covariance matrix==
 
In some applications (e.g. building data models from only partially observed data) one wants to find the “nearest” covariance matrix to a given symmetric matrix (e.g. of observed covariances). In 2002, Higham<ref>{{cite journal|title=Computing the nearest correlation matrix—a problem from finance|journal=IMA Journal of Numerical Analysis|date=|first=Nicholas J.|last=Higham|coauthors=|volume=22|issue=3|pages=329&ndash;343|doi= 10.1093/imanum/22.3.329|url=|format= }}</ref> formalized the notion of nearness using a weighted [[Frobenius norm]] and provided a method for computing the nearest covariance matrix.
 
==Complex random vectors==
The ''variance'' of a [[complex number|complex]] scalar-valued random variable with expected value μ is conventionally defined using [[complex conjugation]]:{{Citation needed|date=February 2012}}
 
:<math>
\operatorname{var}(z)
=
\operatorname{E}
\left[
(z-\mu)(z-\mu)^{*}
\right]
</math>
 
where the complex conjugate of a complex number <math>z</math> is denoted <math>z^{*}</math>; thus the variance of a complex number is a real number.
 
If <math>Z</math> is a column-vector of complex-valued random variables, then the [[conjugate transpose]] is formed by ''both'' transposing and conjugating. In the following expression, the product of a vector with its conjugate transpose results in a square matrix, as its expectation:
 
:<math>
\operatorname{E}
\left[
(Z-\mu)(Z-\mu)^\dagger
\right] ,
</math>
 
where <math>Z^\dagger</math> denotes the conjugate transpose, which is applicable to the scalar case since the transpose of a scalar is still a scalar.  The matrix so obtained will be [[Hermitian matrix|Hermitian]] [[Positive-semidefinite matrix|positive-semidefinite]],<ref>{{Cite journal|url=http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/expect.html|first=Mike |last=Brookes|chapter=Stochastic Matrices|title=The Matrix Reference Manual}}</ref> with real numbers in the main diagonal and complex numbers off-diagonal.
 
==Estimation==
{{Main|Estimation of covariance matrices}}
If <math>\mathbf{M}_{\mathbf{X}}</math> and <math>\mathbf{M}_{\mathbf{Y}}</math> are centred [[Data matrix (multivariate statistics)|data matrices]] of dimension ''n''-by-''p'' and ''n-by-q'' respectively, i.e. with ''n'' rows of observations of ''p'' and ''q'' columns of variables, from which the column means have been subtracted, then, if the column means were estimated from the data, sample correlation matrices <math>\mathbf{Q}_{\mathbf{X}}</math> and <math>\mathbf{Q}_{\mathbf{XY}}</math> can be defined to be
:<math>\mathbf{Q}_{\mathbf{X}} = \frac{1}{n-1} \mathbf{M}_{\mathbf{X}}^T \mathbf{M}_{\mathbf{X}}, \qquad \mathbf{Q}_{\mathbf{XY}} = \frac{1}{n-1} \mathbf{M}_{\mathbf{X}}^T \mathbf{M}_{\mathbf{Y}}</math>
or, if the column means were known a-priori,
:<math>\mathbf{Q}_{\mathbf{X}} = \frac{1}{n} \mathbf{M}_{\mathbf{X}}^T \mathbf{M}_{\mathbf{X}}, \qquad \mathbf{Q}_{\mathbf{XY}} = \frac{1}{n} \mathbf{M}_{\mathbf{X}}^T \mathbf{M}_{\mathbf{Y}}</math>
 
These empirical sample correlation matrices are the most straightforward and most often used estimators for the correlation matrices, but other estimators also exist, including regularised or shrinkage estimators, which may have better properties.
 
==As a parameter of a distribution==
 
If a vector of ''n'' possibly correlated random variables is [[Multivariate normal distribution|jointly normally distributed]], or more generally [[Elliptical distribution|elliptically distributed]], then its [[probability density function]] can be expressed in terms of the covariance matrix.
 
==Applications==
 
===In financial economics===
 
The covariance matrix plays a key role in [[financial economics]], especially in [[Modern portfolio theory|portfolio theory]] and its [[mutual fund separation theorem]] and in the [[capital asset pricing model]]. The matrix of covariances among various assets' returns is  used to determine, under certain assumptions, the relative amounts of different assets that investors should (in a [[Normative economics|normative analysis]]) or are predicted to (in a [[Positive economics|positive analysis]]) choose to hold in a context of [[Diversification (finance)|diversification]].
 
== See also ==
*[[Multivariate statistics]]
*[[Gramian matrix]]
*[[Eigenvalue decomposition]]
*[[Quadratic form (statistics)]]
 
== References ==
{{Reflist}}
 
== Further reading ==
* {{springer|title=Covariance matrix|id=p/c026820}}
* {{mathworld|urlname=CovarianceMatrix|title= Covariance Matrix}}
* {{Cite book|first=N. G. |last=van Kampen|title=Stochastic processes in physics and chemistry|location= New York|publisher=North-Holland|year= 1981|isbn=0-444-86200-5}}
 
{{Statistics}}
 
{{DEFAULTSORT:Covariance Matrix}}
[[Category:Covariance and correlation]]
[[Category:Matrices]]
[[Category:Summary statistics]]
[[Category:Data analysis]]

Latest revision as of 22:48, 27 June 2014

Eusebio Stanfill is what's written on my birth certificate although it is in no way the name on the little birth certificate. Idaho is our birth install. I work as an arrangement clerk. As a man what My husband and i really like is conducting but I'm thinking towards starting something new. You will be able to find my website here: http://prometeu.net

Look into my web blog; clash of clans hack download free