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!
==Examples== Consider three independent random variables <math>A, B, C</math> and two constants <math>q, r</math>. <math display="block"> \begin{align} X &= qA + B \\ Y &= rA + C \\ \operatorname{cov}(X, Y) &= qr \operatorname{var}(A) \end{align} </math> In the special case, <math>q=1</math> and <math>r=1</math>, the covariance between <math>X</math> and <math>Y</math> is just the variance of <math>A</math> and the name covariance is entirely appropriate. [[File:Covariance_geometric_visualisation.svg|thumb|300px|Geometric interpretation of the covariance example. {{nowrap|Each cuboid is the}} [[axis-aligned]] [[bounding box]] of its point {{nowrap|(''x'', ''y'', ''f'' (''x'', ''y'')),}} and the {{nowrap|''X'' and ''Y'' means}} (magenta point). {{nowrap|The covariance}} is the sum of the volumes of the cuboids in the 1st and 3rd quadrants (red) and in the 2nd and 4th (blue).]] Suppose that <math>X</math> and <math>Y</math> have the following [[joint probability distribution|joint probability mass function]],<ref>{{Cite web| url=https://onlinecourses.science.psu.edu/stat414/node/109| title=Covariance of X and Y {{!}} STAT 414/415|publisher=The Pennsylvania State University | access-date=August 4, 2019 | archive-url=https://web.archive.org/web/20170817034656/https://onlinecourses.science.psu.edu/stat414/node/109 | archive-date=August 17, 2017}}</ref> in which the six central cells give the discrete joint probabilities <math>f(x, y)</math> of the six hypothetical realizations {{nowrap|<math>(x, y) \in S = \left\{ (5, 8), (6, 8), (7, 8), (5, 9), (6, 9), (7, 9) \right\}</math>:}} {| class="wikitable" style="text-align:center;" !rowspan="2" colspan="2"|<math>f(x,y)</math> !colspan="3"|''x'' |rowspan="6" style="padding:1px;"| !rowspan="2"|<math>f_Y(y)</math> |- !5 !6 !7 |- !rowspan="2"|''y'' !8 |0 |0.4 |0.1 |0.5 |- !9 |0.3 |0 |0.2 |0.5 |- |colspan="7" style="padding:1px;"| |- !colspan="2"|<math>f_X(x)</math> |0.3 |0.4 |0.3 |1 |} <math>X</math> can take on three values (5, 6 and 7) while <math>Y</math> can take on two (8 and 9). Their means are <math>\mu_X = 5(0.3) + 6(0.4) + 7(0.1 + 0.2) = 6</math> and <math>\mu_Y = 8(0.4 + 0.1) + 9(0.3 + 0.2) = 8.5</math>. Then, <math display="block">\begin{align} \operatorname{cov}(X, Y) ={} &\sigma_{XY} = \sum_{(x,y)\in S}f(x, y) \left(x - \mu_X\right)\left(y - \mu_Y\right) \\[4pt] ={} &(0)(5 - 6)(8 - 8.5) + (0.4)(6 - 6)(8 - 8.5) + (0.1)(7 - 6)(8 - 8.5) +{} \\[4pt] &(0.3)(5 - 6)(9 - 8.5) + (0)(6 - 6)(9 - 8.5) + (0.2)(7 - 6)(9 - 8.5) \\[4pt] ={} &{-0.1} \; . \end{align}</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