Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

How do you find the standard deviation of the weighted mean?

The weighted mean is defined: $\bar{x}_w = \frac{\sum{wx}}{\sum{w}}$

The weighted standard deviation (since it is not specified, I take it as of the distribution) is defined:

$$s_w = \sqrt{\frac{N'\sum_{i=1}^N {w_i(x_i-\bar{x}_w)^2}}{(N'-1)\sum_{i=1}^N{w_i}}},$$

where $N'$ is the number of nonzero weights, and $\bar x_w$ is the weighted mean of the sample (source)

For an unweighted sample, calculating the standard deviation of the mean from the standard deviation of the distribution is described on Wikipedia.

How do I calculate it for the weighted mean, and how is the expression derived?

share|cite|improve this question

marked as duplicate by Jack D'Aurizio, Hakim, Davide Giraudo, user63181, ᴡᴏʀᴅs Jun 13 '14 at 21:26

This question was marked as an exact duplicate of an existing question.

The standard error of the weighted mean is not the same as the weighted standard deviation of the sample. See <…; – Avraham Jun 13 '14 at 16:14

I think that your answer is

$$\frac{\sum w_i(\theta_i-\bar{\theta})(\theta_i-\bar{\theta})'}{\sum w_i}$$

share|cite|improve this answer

The weighted mean $\bar x=\frac{\sum\limits_{i=1}^n w_ix_i}{\sum\limits_{i=1}^n w_i}$

First, let's find its variance (suppose that $Var(x) =\sigma^2 $):

$$Var(\bar x)=Var\left(\frac{\sum\limits_{i=1}^n w_ix_i}{\sum\limits_{i=1}^n w_i}\right)=\frac{1}{\left (\sum\limits_{i=1}^n w_i \right)^2}Var\left(\sum\limits_{i=1}^n w_ix_i\right)=\frac{1}{\left (\sum\limits_{i=1}^n w_i \right)^2}\sum\limits_{i=1}^n Var\left( w_ix_i\right)=\\=\frac{\sum\limits_{i=1}^n w_i^2}{\left (\sum\limits_{i=1}^n w_i \right)^2}\sigma^2$$

Take the square root of the expression and you get standard deviation of mean.

share|cite|improve this answer

TO understand what the weights do, assume that the weights are all integers (if they are rational you can multiply out the LCM of the denominators). To keep it simple assume you have 3 data points with weight 2, 3 and 5.

Your mean is then $$ \frac{2 x_1 + 3 x_2 + 5 x_3}{2 + 3 + 5} $$

Now suppose you go back to your $3$ data points and want to make $x_3$ important (i.e. bias the mean towards $x_3$). One way to do this is to make up additional data by writing $x_3$ 5times. You do the same for $x_2$ except you write it $3$ times and $x_1$ two times.

To be specific, suppose that $x_1=1$, $x_2=0$, $x_3=8$.

$$ \text{Unweighted mean} = \frac{1+0+8}{3} = 3 $$ With weights, your data is now $\left[1,1, 0,0,0,8,8,8,8,8\right]$. So your weighted mean is $$ \text{Weighted mean} = \frac{1+1+0+0+0+8+8+8+8+8}{10} = 4.2$$ See how the mean shifted from $3$ towards $8$ to become $4.2$.

Weights are a way to make some data more important than others.

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.