Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Covariance
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Discrete random variables=== If the (real) random variable pair <math>(X,Y)</math> can take on the values <math>(x_i,y_i)</math> for <math>i = 1,\ldots,n</math>, with equal probabilities <math>p_i=1/n</math>, then the covariance can be equivalently written in terms of the means <math>\operatorname{E}[X]</math> and <math>\operatorname{E}[Y]</math> as <math display="block">\operatorname{cov} (X,Y) = \frac{1}{n}\sum_{i=1}^n (x_i-E(X)) (y_i-E(Y)).</math> It can also be equivalently expressed, without directly referring to the means, as<ref>{{cite conference |author=Yuli Zhang |author2=Huaiyu Wu |author3=Lei Cheng |title=Some new deformation formulas about variance and covariance|book-title=Proceedings of 4th International Conference on Modelling, Identification and Control(ICMIC2012)|date=June 2012 |pages=987β992}}</ref> <math display="block"> \operatorname{cov}(X,Y) = \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \frac{1}{2}(x_i - x_j)(y_i - y_j) = \frac{1}{n^2} \sum_i \sum_{j>i} (x_i-x_j)(y_i - y_j). </math> More generally, if there are <math>n</math> possible realizations of <math>(X,Y)</math>, namely <math>(x_i,y_i)</math> but with possibly unequal probabilities <math>p_i </math> for <math>i = 1,\ldots,n</math>, then the covariance is <math display="block">\operatorname{cov} (X,Y) = \sum_{i=1}^n p_i (x_i-E(X)) (y_i-E(Y)).</math> In the case where two discrete random variables <math>X</math> and <math>Y</math> have a joint probability distribution, represented by elements <math>p_{i,j}</math> corresponding to the joint probabilities of <math>P( X = x_i, Y = y_j )</math>, the covariance is calculated using a double summation over the indices of the matrix: <math display="block">\operatorname{cov} (X, Y) = \sum_{i=1}^{n}\sum_{j=1}^{n} p_{i,j} (x_i - E[X])(y_j - E[Y]).</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Covariance
(section)
Add topic