ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Sample mean and sample covariance - Wikipedia, the free encyclopedia

Sample mean and sample covariance

From Wikipedia, the free encyclopedia

Sample mean and sample covariance are statistics computed from a collection of data, thought of as being random.

Contents

[edit] Sample mean and covariance

Given a random sample \textstyle \mathbf{x}_{1},\ldots,\mathbf{x}_{N} from an \textstyle n-dimensional random variable \textstyle \mathbf{X} (i.e., realizations of \textstyle N independent random variables with the same distribution as \textstyle \mathbf{X}), the sample mean is

 \mathbf{\bar{x}}=\frac{1}{N}\sum_{k=1}^{N}\mathbf{x}_{k}.

In coordinates, writing the vectors as columns,

 \mathbf{x}_{k}=\left[ \begin{array} [c]{c}x_{1k}\\ \vdots\\ x_{nk}\end{array} \right]  ,\quad\mathbf{\bar{x}}=\left[ \begin{array} [c]{c}\bar{x}_{1}\\ \vdots\\ \bar{x}_{n}\end{array} \right]  ,

the entries of the sample mean are

 \bar{x}_{i}=\frac{1}{N}\sum_{k=1}^{N}x_{ik},\quad i=1,\ldots,n.

The sample covariance of \textstyle \mathbf{x}_{1},\ldots,\mathbf{x}_{N} is the \textstyle n by \textstyle n matrix \textstyle \mathbf{Q}=\left[  q_{ij}\right]  with the entries given by

 q_{ij}=\frac{1}{N-1}\sum_{k=1}^{N}\left(  x_{ik}-\bar{x}_{i}\right)  \left( x_{jk}-\bar{x}_{j}\right)

The sample mean and the sample covariance matrix are unbiased estimates of the mean and the covariance matrix of the random variable \textstyle \mathbf{X}. The reason why the sample covariance matrix has \textstyle N-1 in the denominator rather than \textstyle N is essentially that the population mean E(X) is not known and is replaced by the sample mean \textstyle\bar{x}. If the population mean E(X) is known, the analogous unbiased estimate

 q_{ij}=\frac{1}{N}\sum_{k=1}^{N}\left(  x_{ik}-E(X_i)\right)  \left( x_{jk}-E(X_j)\right)

with the population mean indeed does have \textstyle N. This is an example why in probability and statistics it is essential to distinguish between upper case letters (random variables) and lower case letters (realizations of the random variables).

The maximum likelihood estimate of the covariance

 q_{ij}=\frac{1}{N}\sum_{k=1}^{N}\left(  x_{ik}-\bar{x}_{i}\right)  \left( x_{jk}-\bar{x}_{j}\right)

for the Gaussian distribution case has \textstyle N as well. The difference of course diminishes for large \textstyle N.

[edit] Weighted samples

In a weighted sample, each vector \textstyle \textbf{x}_{k} is assigned a weight \textstyle w_{k}\geq0. Without loss of generality, assume that the weights are normalized:

 \sum_{k=1}^{N}w_{k}=1.

(If they are not, divide the weights by their sum.) Then the weighted mean \textstyle \mathbf{\bar{x}} and the weighted covariance matrix \textstyle \mathbf{Q}=\left[  q_{ij}\right]  are given by

 \mathbf{\bar{x}}=\sum_{k=1}^{N}w_{k}\mathbf{x}_{k}

and[1]

 q_{ij}=\frac{\sum_{k=1}^{N}w_{k}\left(  x_{ik}-\bar{x}_{i}\right)  \left( x_{jk}-\bar{x}_{j}\right)  }{1-\sum_{k=1}^{N}w_{k}^{2}}.

If all weights are the same, \textstyle w_{k}=1/N, the weighted mean and covariance reduce to the sample mean and covariance above.

[edit] References

  1. ^ Mark Galassi, Jim Davies, James Theiler, Brian Gough, Gerard Jungman, Michael Booth, and Fabrice Rossi. GNU Scientific Library - Reference manual, Version 1.9, 2007. Sec. 20.6 Weighted Samples

[edit] See also


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -