Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Weird formula for the variance of the -mean- function


From   Jan Brink Valentin / Region Nordjylland <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Weird formula for the variance of the -mean- function
Date   Mon, 3 Feb 2014 11:57:10 +0000

I am using -mean- in Stata 11.0.

The documentation claims that the variance stored in e(V) is calculated using:
e(V) = 1/(W(W-1))sum( w_j(y_j-m)^2 ),
where w_j is the weight associated with the data point y_j, W is the sum of weights and m is the mean value. I have tested the -mean- function, and Stata does indeed calculate the variance this way. However, I do not understand why the sum of squares is divided by W(W-1).

The most obvious problem with this formula is that the variance is undefined if the weights are normalized. Even more, the variance depends on the scaling of the weights, which I find odd.

It is not problematic for me to extract the "real" variance, but I am very curious to find out why the variance is calculated this way.

Sincerely,
Jan Valentin

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index