Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Covariance
(section)
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!
== Numerical computation == {{main|Algorithms for calculating variance#Covariance}} When <math>\operatorname{E}[XY] \approx \operatorname{E}[X]\operatorname{E}[Y]</math>, the equation <math>\operatorname{cov}(X, Y) = \operatorname{E}\left[X Y\right] - \operatorname{E}\left[X\right] \operatorname{E}\left[Y\right]</math> is prone to [[catastrophic cancellation]] if <math>\operatorname{E}\left[X Y\right]</math> and <math>\operatorname{E}\left[X\right] \operatorname{E}\left[Y\right]</math> are not computed exactly 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> [[Algorithms for calculating variance#Covariance|Numerically stable algorithms]] should be preferred in this case.<ref>{{Cite book|last1=Schubert|first1=Erich|last2=Gertz|first2=Michael|title=Proceedings of the 30th International Conference on Scientific and Statistical Database Management |chapter=Numerically stable parallel computation of (Co-)variance |date=2018|chapter-url=http://dl.acm.org/citation.cfm?doid=3221269.3223036|language=en|location=Bozen-Bolzano, Italy|publisher=ACM Press|pages=1β12|doi=10.1145/3221269.3223036|isbn=978-1-4503-6505-5|s2cid=49665540}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)