Action potential: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Chiswick Chap
See also: rm item linked above in text
en>Jianhui67
m (Script) File renamed: File:Action potential2.svgFile:Ventricular myocyte action potential.svg File renaming criterion #3: Correct misleading names into accurate ones.There are different types...
Line 1: Line 1:
{{About|the measure of linear relation between random variables}}
Marvella is what you can contact her but it's not the most feminine name out there. For many years he's been working as a receptionist. To gather coins is a thing that I'm totally addicted to. Years ago we moved to North Dakota.<br><br>Stop by my site - [http://Tiny6.com/diettogoreviews74620 http://Tiny6.com]
 
In [[probability theory]] and [[statistics]], '''covariance''' is a measure of how much two [[random variable]]s change together. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the smaller values, i.e., the variables tend to show similar behavior, the covariance is positive.<ref>http://mathworld.wolfram.com/Covariance.html</ref> In the opposite case, when the greater values of one variable mainly correspond to the smaller values of the other, i.e., the variables tend to show opposite behavior, the covariance is negative. The sign of the covariance therefore shows the tendency in the linear relationship between the variables. The magnitude of the covariance is not easy to interpret. The [[Covariance and correlation|normalized version of the covariance]], the [[Pearson product-moment correlation coefficient|correlation coefficient]], however, shows by its magnitude the strength of the linear relation.
 
A distinction must be made between (1) the covariance of two random variables, which is a [[Statistical population|population]] [[Statistical parameter|parameter]] that can be seen as a property of the [[joint probability distribution]], and (2) the [[sample (statistics)|sample]] covariance, which serves as an [[Statistical estimation|estimated]] value of the parameter.
 
== Definition ==
The covariance between two [[Joint distribution|jointly distributed]] [[real number|real]]-valued [[random variable]]s ''x'' and ''y'' with finite [[second moment]]s is defined<ref>Oxford Dictionary of Statistics, Oxford University Press, 2002, p. 104.</ref> as
:<math>
\sigma(x,y) = \operatorname{E}{\big[(x - \operatorname{E}[x])(y - \operatorname{E}[y])\big]},
</math>
where E[''x''] is the [[expected value]] of ''x'', also known as the mean of ''x''. By using the linearity property of expectations, this can be simplified to
:<math>
\begin{align}
\sigma(x,y)
&= \operatorname{E}\left[\left(x - \operatorname{E}\left[x\right]\right) \left(y - \operatorname{E}\left[y\right]\right)\right] \\
&= \operatorname{E}\left[x y - x \operatorname{E}\left[y\right] - \operatorname{E}\left[x\right] y + \operatorname{E}\left[x\right] \operatorname{E}\left[y\right]\right] \\
&= \operatorname{E}\left[x y\right] - \operatorname{E}\left[x\right] \operatorname{E}\left[y\right] - \operatorname{E}\left[x\right] \operatorname{E}\left[y\right] + \operatorname{E}\left[x\right] \operatorname{E}\left[y\right] \\
&= \operatorname{E}\left[x y\right] - \operatorname{E}\left[x\right] \operatorname{E}\left[y\right].
\end{align}
</math>
However, when <math>\operatorname{E}[xy] \approx \operatorname{E}[x]\operatorname{E}[y]</math>, this last equation is prone to [[catastrophic cancellation]] when computed with floating point arithmetic and thus should be avoided in computer programs when the data has not been centered before.<ref>[[Donald E. Knuth]] (1998). ''[[The Art of Computer Programming]]'', volume 2: ''Seminumerical Algorithms'', 3rd edn., p. 232. Boston: Addison-Wesley.</ref>
 
For [[random vector]]s <math>\mathbf{x}</math> and <math>\mathbf{y}</math> (of dimension ''m'' and ''n'' respectively) the ''m×n'' [[cross covariance]] matrix (also known as '''dispersion matrix''' or '''variance–covariance matrix''',<ref>W. J. Krzanowski, ''Principles of Multivariate Analysis'', Chap. 7.1, Oxford University Press, New York, 1988</ref> or simply called [[covariance matrix]]) is equal to
 
: <math>
\begin{align}
    \sigma(\mathbf{x},\mathbf{y})
              & = \operatorname{E}
              \left[(\mathbf{x} - \operatorname{E}[\mathbf{x}])
                  (\mathbf{y} - \operatorname{E}[\mathbf{y}])^\mathrm{T}\right]\\
              & = \operatorname{E}\left[\mathbf{x} \mathbf{y}^\mathrm{T}\right] - \operatorname{E}[\mathbf{x}]\operatorname{E}[\mathbf{y}]^\mathrm{T},
\end{align}
</math>
 
where '''m'''<sup>T</sup> is the [[transpose]] of the vector (or matrix) '''m'''.
 
The (''i'',''j'')-th element of this matrix is equal to the covariance Cov(''x<sub>i</sub>'', ''y<sub>j</sub>'') between the ''i''-th scalar component of ''x'' and the ''j''-th scalar component of ''y''. In particular, Cov(''y'',&nbsp;''x'') is the [[transpose]]  of Cov(''x'',&nbsp;''y'').
 
For a vector <math>\mathbf{x}=
\begin{bmatrix}x_1 & x_2 & \dots & x_m\end{bmatrix}^\mathrm{T}
</math> of ''m'' jointly distributed random variables with finite second moments, its [[covariance matrix]] is defined as
 
:<math> \Sigma(\mathbf{x}) = \sigma(\mathbf{x},\mathbf{x}) .</math>
 
Random variables whose covariance is zero are called [[uncorrelated]].
 
The [[unit of measurement|units of measurement]] of the covariance Cov(''x'',&nbsp;''y'') are those of ''x'' times those of ''y''.  By contrast, [[correlation|correlation coefficients]], which depend on the covariance, are a [[dimensionless number|dimensionless]] measure of linear dependence. (In fact, correlation coefficients can simply be understood as a normalized version of covariance.)
 
== Properties ==
* [[Variance]] is a special case of the covariance when the two variables are identical:
:<math>\sigma(x, x) =\sigma^2(x).</math>
 
*If ''x'', ''y'', ''w'', and ''v'' are real-valued random variables and ''a'', ''b'', ''c'', ''d'' are constant ("constant" in this context means non-random), then the following facts are a consequence of the definition of covariance:
 
: <math>
\begin{align}
    \sigma(x, a) &= 0 \\
    \sigma(x, x) &= \sigma^2(x) \\
    \sigma(x, y) &= \sigma(y, x) \\
    \sigma(ax, by) &= ab\, \sigma(x, y) \\
    \sigma(x+a, y+b) &= \sigma(x, y) \\
    \sigma(ax+by, cw+dv) &= ac\,\sigma(x,w)+ad\,\sigma(x,v)+bc\,\sigma(y,w)+bd\,\sigma(y,v)
\end{align}
</math>
 
For a sequence ''x''<sub>1</sub>, ..., ''x''<sub>''n''</sub> of random variables, and constants ''a''<sub>1</sub>, ..., ''a''<sub>''n''</sub>, we have
 
:<math>\sigma^2\left(\sum_{i=1}^n a_ix_i \right) = \sum_{i=1}^n a_i^2\sigma^2(x_i) + 2\sum_{i,j\,:\,i<j} a_ia_j\sigma(x_i,x_j) = \sum_{i,j} {a_ia_j\sigma(x_i,x_j)}
</math>
 
=== A more general identity for covariance matrices ===
 
Let <math>\mathbf{x}</math> be a [[random vector]] with covariance matrix <math>\Sigma(\mathbf{x})</math>, and let <math>A</math> be a matrix that can act on <math>\mathbf{x}</math>. The covariance matrix of the vector <math>A\mathbf{x}</math> is:
:<math>
\Sigma(A\mathbf{x}) = A\, \Sigma(\mathbf{x})\, A^\mathrm{T}</math>.
 
This is a direct result of the linearity of [[expected value|expectation]] and is useful
when applying a [[linear transformation]], such as a [[whitening transformation]], to a vector.
 
===Uncorrelatedness and independence===
If ''x'' and ''y'' are [[statistical independence|independent]], then their covariance is zero. This follows because under independence,
 
: <math>\operatorname{E}\left[x y\right] = \operatorname{E}[x] \cdot \operatorname{E}[y]. </math>
 
The converse, however, is not generally true. For example, let ''x'' be uniformly distributed in [-1, 1] and let ''y''&nbsp;=&nbsp;x<sup>2</sup>. Clearly, ''x'' and ''y'' are dependent, but
: <math>
\begin{align}
\sigma(x, y) &= \sigma(x, x^2) \\
        &= \operatorname{E}\!\left[x \cdot x^2\right] - \operatorname{E}[x] \cdot \operatorname{E}\!\left[x^2\right] \\
        &= \operatorname{E}\!\left[x^3\right] - \operatorname{E}[x]\operatorname{E}\!\left[x^2\right]  \\
        &= 0 - 0 \cdot \operatorname{E}\!\left[x^2\right]  \\
        &= 0. 
\end{align}
</math>
In this case, the relationship between ''y'' and ''x'' is non-linear, while
correlation and covariance are measures of linear dependence between two variables.
This example shows that if two variables are uncorrelated, that does not in general imply that they are independent. However, if two variables are [[Multivariate normal distribution|jointly normally distributed]] (but not if they are merely [[Normally distributed and uncorrelated does not imply independent|individually normally distributed]]), uncorrelatedness ''does'' imply independence.
 
=== Relationship to inner products ===
Many of the properties of covariance can be extracted elegantly by observing that it satisfies similar properties to those of an [[inner product]]:
# [[bilinear operator|bilinear]]:  for constants ''a'' and ''b'' and random variables ''x'', ''y'', ''z'', σ(''ax''&nbsp;+&nbsp;''by'',&nbsp;''z'') =&nbsp;''a''&nbsp;σ(''x'',&nbsp;''z'')&nbsp;+&nbsp;''b''&nbsp;σ(''y'',&nbsp;''z'');
# symmetric:  σ(''x'',&nbsp;''y'') = σ(''y'',&nbsp;''x'');
# [[definite bilinear form|positive semi-definite]]:  σ<sup>2</sup>(''x'') = σ(''x'',&nbsp;''x'')&nbsp;≥&nbsp;0 for all random variables ''x'', and σ(''x'',&nbsp;''x'') =&nbsp;0 implies that ''x'' is a constant random variable&nbsp;(''K'').
 
In fact these properties imply that the covariance defines an inner product over the [[quotient space (linear algebra)|quotient vector space]] obtained by taking the subspace of random variables with finite second moment and identifying any two that differ by a constant. (This identification turns the positive semi-definiteness above into positive definiteness.) That quotient vector space is isomorphic to the subspace of random variables with finite second moment and mean zero; on that subspace, the covariance is exactly the [[Lp space|L<sup>2</sup>]] inner product of real-valued functions on the sample space.
 
As a result for random variables with finite variance, the inequality
 
: <math>|\sigma(x,y)| \le \sigma(x) \sigma(y) </math>
 
holds via the [[Cauchy–Schwarz inequality]].
 
Proof: If σ<sup>2</sup>(''y'') = 0, then it holds trivially.  Otherwise, let random variable
 
: <math> z = x - \frac{\sigma(x,y)}{\sigma^2(y)} y.</math>
 
Then we have
 
: <math>
\begin{align}
0 \le \sigma^2(z) & = \sigma\left(x - \frac{\sigma(x,y)}{\sigma^2(y)} y,x - \frac{\sigma(x,y)}{\sigma^2(y)} y \right) \\[12pt]
& = \sigma^2(x) - \frac{ (\sigma(x,y))^2 }{\sigma^2(y)}.
\end{align}
</math>
 
== Calculating the sample covariance ==
{{Main|Sample mean and sample covariance}}
 
The sample covariance of ''N'' observations of ''K'' variables is the ''K''-by-''K'' [[Matrix (mathematics)|matrix]] <math>\textstyle \overline{ \overline q }=\left[[  q_{jk}]\right] </math> with the entries
 
:<math> q_{jk}=\frac{1}{N-1}\sum_{i=1}^{N}\left(  x_{ij}-\bar{x}_j \right)  \left( x_{ik}-\bar{x}_k \right) </math>,
 
which is an estimate of the covariance between
variable {{math|j}} and variable {{math|k}}.
 
The sample mean and the sample covariance matrix are [[Bias of an estimator|unbiased estimates]] of the [[mean]] and the [[covariance matrix]] of the [[random vector]] <math>\textstyle \mathbf{x}</math>, a row vector whose ''j''<sup>th</sup> element (''j = 1, ..., K'') is one of the random variables. The reason the sample covariance matrix has <math>\textstyle N-1</math> in the denominator rather than <math>\textstyle N</math> is essentially that the population mean <math>E(x)</math> is not known and is replaced by the sample mean <math>\mathbf{\bar{x}}</math>. If the population mean <math>E(x)</math> is known, the analogous unbiased estimate is given by
 
:<math> q_{jk}=\frac{1}{N}\sum_{i=1}^N \left(  x_{ij}-E(x_j)\right)  \left( x_{ik}-E(x_k)\right) </math>
 
== Comments ==
 
The covariance is sometimes called a measure of "linear dependence" between the two random variables. That does not mean the same thing as in the context of [[linear algebra]] (see [[linear dependence]]). When the covariance is normalized, one obtains the [[correlation matrix|correlation coefficient]]. From it, one can obtain the [[Pearson coefficient]], which gives us the goodness of the fit for the best possible linear function describing the relation between the variables. In this sense covariance is a linear gauge of dependence.
 
==Applications==
 
=== In genetics and molecular biology ===
Covariance is an important measure in biology. Certain sequences of DNA are conserved more than others among species, and thus to study secondary and tertiary structures of proteins, or of RNA structures, we compare sequences in closely related species. If we find sequence changes or no changes at all in noncoding RNA (such as microRNA), we can find out about which sequences are necessary for common structural motifs, such as an RNA loop.
 
===In financial economics===
 
Covariances play a key role in [[financial economics]], especially in [[Modern portfolio theory|portfolio theory]] and in the [[capital asset pricing model]]. Covariances among various assets' returns are 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 ==
{{Div col|cols=3}}
* [[Algorithms_for_calculating_variance#Covariance|Algorithms for calculating covariance]]
* [[Analysis of covariance]]
* [[Autocovariance]]
* [[Correlation and dependence]]
* [[Covariance function]]
* [[Covariance matrix]]
* [[Covariance operator]]
* [[Distance covariance]], or Brownian covariance.
* [[Eddy covariance]]
* [[Law of total covariance]]
* [[Propagation of uncertainty]]
{{Div col end}}
 
==References==
{{Refimprove|date=December 2010}}
{{More footnotes|date=December 2010}}
{{Reflist}}
 
== External links ==
{{Wiktionary|covariance}}
* {{springer|title=Covariance|id=p/c026800}}
* [http://mathworld.wolfram.com/Covariance.html MathWorld page on calculating the sample covariance]
* [http://www.r-tutor.com/elementary-statistics/numerical-measures/covariance Covariance Tutorial using R]
 
{{statistics}}
 
[[Category:Covariance and correlation]]
[[Category:Algebra of random variables]]

Revision as of 17:29, 21 February 2014

Marvella is what you can contact her but it's not the most feminine name out there. For many years he's been working as a receptionist. To gather coins is a thing that I'm totally addicted to. Years ago we moved to North Dakota.

Stop by my site - http://Tiny6.com