# Weighted Importance in sampled data statistics

1. Nov 4, 2012

### X89codered89X

I was just wondering how exactly to appropriately modify the 1st and 2nd order stats when you want to weight a given sample more heavily. If $\vec{X}$ is my vector of N samples and I have a weight vector $\vec{W}$ of the same dimension, which ideally is measuring the reliability of each sample from 0 to 1. Could I calculate mean and variance using...

$\vec{Y}_i= \vec{X}_i\vec{W}_i \\ \mu_{x-weighted} = E[\vec{Y}] \\ \sigma_{x-weighted} = E[(\vec{Y}-E[\vec{Y}])^2] \\$

Let me know what you think. Thanks.

EDIT: $\LaTeX$ mods...

2. Nov 4, 2012

### Number Nine

The weighted mean is given by...

$$\mu_w = \frac{\sum x_iw_i}{\sum w_i}$$

The weighted sample variance is...

$$\sigma^2_w = \frac{\sum w_i(x_i - \mu_w)^2}{\sum w_i}$$

3. Nov 4, 2012

Hey thanks!