Math and Stat

2008-11-24 11:14 pm
點解s.d要用n-1計?

有一個解釋係: suppose that random samples, each of size n, are drawn from an infinite population with non-zero variance o^2 and their variances s^2(first sample), s^2(second sample), ... , are calculated according to the definition of s with n-1. It can be shown that the average of these sample variances will tend to o^2 as the number of samples tends to infinity. Why? (第一問)

On the other hand, if sample vairances are calculated from the definition of s^2 with n, the average of these sample variances will tend to (n-1)/n X o^2 as the number of samples tends to infinity? Why? (第二問)

回答 (1)

2008-11-25 2:31 am
✔ 最佳答案
為甚麼s.d要用n-1計。因為用n-1的那個是無偏的。但個proof 好長。不過都找到啦。看不明可以電郵我
Expected Value of S2
The following is a proof that the formula for the sample variance, S2, is unbiased. Recall that it seemed like we should divide by n, but instead we divide by n-1. Here's why.
First, recall the formula for the sample variance:



圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img14.gif



Now, we want to compute the expected value of this:



圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img15.gif


Now, let's multiply both sides of the equation by n-1, just so we don't have to keep carrying that around, and square out the right side, just like we did with that shortcut formula for SSX, above.



圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img16.gif



Now, if you think about it, it's clear that
圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img1.gif
:



圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img18.gif



Let's write that again as a numbered equation:







圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img19.gif

(1)


Unfortunately, the expected value of the square of something is not equal to the square of the expected value, so we seem to have hit an impasse with both terms on the RHS. But, we're not out of tricks yet. Each of those terms is an expected value of something squared: a second moment. Let's use the trick about moments that we saw above.
First, let Y be the random variable defined by the sample mean,
圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img1.gif
. We're trying to figure out the expected value of its square.



圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img20.gif



We can substitute this stuff for the second term on the RHS of equation 1. Also, note that the first term on the RHS of eqation 1 is the second moment of X, so that can also be re-written. Doing both substitutions gives us:




圖片參考:http://www.spelman.edu/~anderson/teaching/437/unbiased/img21.gif



Whew! That was hard, but solvable. This is why S2 with the n-1 denominator is an unbiased estimator.


收錄日期: 2021-04-25 16:58:25
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081124000051KK00785

檢視 Wayback Machine 備份