请输入您要查询的百科知识:

 

词条 Algebraic formula for the variance
释义

  1. In terms of raw moments

     Proof  Generalization to covariance 

  2. See also

  3. References

{{see also|Algorithms for calculating variance}}

In probability theory and statistics, there are several algebraic formulae for the variance available for deriving the variance of a random variable. The usefulness of these depends on what is already known about the random variable; for example a random variable may be defined in terms of its probability density function or by construction from other random variables. The context here is that of deriving algebraic expressions for the theoretical variance of a random variable, in contrast to questions of estimating the variance of a population from sample data for which there are special considerations in implementing computational algorithms.

In terms of raw moments

If the raw moments E(X) and E(X 2) of a random variable X are known (where E(X) is the expected value of X), then Var(X) is given by

The result is called the König–Huygens formula in French-language literature[1] and known as Steiner translation theorem in Germany.[2]

There is a corresponding formula for use in estimation of the variance from sample data, that can be of use in hand calculations. This is a closely related identity that is structured to create an unbiased estimate of the population variance

However, use of these formulas can be unwise in practice when using floating point arithmetic with limited precision: subtracting two values having a similar magnitude can lead to catastrophic cancellation,[3] and thus causing a loss of significance when .[4]

There several other numerically stable algorithms for calculating variance for use with floating point numbers.[4]

Proof

The computational formula for the population variance follows in a straightforward manner from the linearity of expected values and the definition of variance:

Generalization to covariance

This formula can be generalized for covariance, with two random variables Xi and Xj:

as well as for the n by n covariance matrix of a random vector of length n:

and for the n by m cross-covariance matrix between two random vectors of length n and m:

where expectations are taken element-wise and and are random vectors of respective lengths n and m.

Note that this formula suffers from the same loss of significance as the formula for variance if used for calculating estimates of the covariance, and alternative algorithms should be used instead.[4]

See also

  • Standard deviation: Identities and mathematical properties

References

1. ^In French: formule de Koenig–Huygens. See e.g. {{citation|title=Maths: prépas commerciales|first=Jean-Jacques|last=Martiano|publisher=Studyrama|year=2006|isbn=9782844728289|page=148}}
2. ^In German: Verschiebungssatz von Steiner. See e.g. {{citation|title=Starthilfe Stochastik: Studium|first1=Gerd|last1=Christoph|first2=Horst|last2=Hackel|publisher=Springer|year=2013|isbn=9783322847997|page=50|url=https://books.google.com/books?id=Hiw25tqvScsC&pg=PA50}}.
3. ^Donald E. Knuth (1998). The Art of Computer Programming, volume 2: Seminumerical Algorithms, 3rd edn., p. 232. Boston: Addison-Wesley.
4. ^{{Cite book|last=Schubert|first=Erich|last2=Gertz|first2=Michael|date=2018-07-09|title=Numerically stable parallel computation of (co-)variance|url=http://dl.acm.org/citation.cfm?id=3221269.3223036|publisher=ACM|pages=10|doi=10.1145/3221269.3223036|isbn=9781450365055}}

1 : Statistical deviation and dispersion

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 3:57:14