image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

image Expected value of sample variance Share It Thread Tools Search this Thread image
Old Jun23-09, 05:27 PM                  #1
musicgold

musicgold is Offline:
Posts: 66
Expected value of sample variance

Hi,

My question is related to this web page. http://en.wikipedia.org/wiki/Estimator_bias

In the Examples section, note the equation for the expected value of sample variance.

LaTeX Code:  {E}(S^2)=\\frac{n-1}{n} \\sigma^2


Could anybody please show me the steps to go from the sample variance equation (given below) to the above equation?


LaTeX Code: S^2=\\frac{1}{n}\\sum_{i=1}^n(X_i-\\overline{X}\\,)^2


Thanks

MG.
  Reply With Quote
Old Jun23-09, 06:15 PM                  #2
mXSCNT

mXSCNT is Offline:
Posts: 261
Re: Expected value of sample variance

well, that "sample variance" was defined for the purposes of that page. The usual sample variance divides by n-1 instead of by n, so it is not biased. This page includes a derivation of that fact.
  Reply With Quote
Old Jun23-09, 07:47 PM                  #3
mathman
 
mathman's Avatar

mathman is Offline:
Posts: 2,440
Recognitions:
Science Advisor Science Advisor
Re: Expected value of sample variance

The essential point for the use of n-1 rather than n is that the sample variance makes use of the sample mean, not the theoretical mean.

Specifically, let x be one sample, m the theoretical mean and a the statistical average.
Then E(x-a)2=E(x-m+m-a)2=E(x-m)2+E(m-a)2+2E((x-m)(m-a)).
When you plow through the details, the factor shows up.
  Reply With Quote
Old Jun23-09, 10:24 PM                  #4
musicgold

musicgold is Offline:
Posts: 66
Re: Expected value of sample variance

Thanks folks. However, my question is not about the use of n-1 in the denominator. I understand the concept of the degrees of freedom.

I wish to know the operations/steps I need to perform on the Sample Variance equation to get the expected value equation.

Thanks again,

MG.
  Reply With Quote
Old Jun24-09, 02:34 AM                  #5
mXSCNT

mXSCNT is Offline:
Posts: 261
Re: Expected value of sample variance

I gave you the answer.
  Reply With Quote
Old Jun24-09, 07:49 AM                  #6
statdad

statdad is Offline:
Posts: 702
Recognitions:
Homework Helper Homework Helper
Re: Expected value of sample variance

Is this what you're looking for?

First consider (I'll bring in the 1/n later)

LaTeX Code: <BR>\\sum (x_i - \\bar x)^2 = \\sum x_i^2 - n\\bar{x}^2<BR>

The expected value of this expression is

LaTeX Code: <BR>\\begin{align*}<BR>E\\left(\\sum(x_i - \\bar x^2)^2\\right) &= \\sum E(x_i^2) - n E\\left( \\bar{x}^2\\right)\\\\<BR>& = \\sum \\left(\\mu^2 + \\sigma^2\\right) - n \\frac 1 {n^2} \\left(\\sum E(x_i^2) + \\sum_{i<j} x_i x_j \\right) \\\\<BR>& = n\\mu^2 + n \\sigma^2 - \\frac 1 n \\left( n \\mu^2 + n \\sigma^2 + n(n-1) \\mu^2 \\right) \\\\<BR>& = n\\mu^2 + n \\sigma^2 - \\mu^2 - \\sigma^2 - (n-1) \\mu^2 \\\\<BR>& = n\\mu^2 + n\\sigma^2 - n \\mu^2 - \\sigma^2 \\\\<BR>& = (n-1) \\sigma^2<BR>\\end{align*}<BR>

Now
LaTeX Code: <BR>\\begin{align*}<BR>S^2 & = \\frac 1 n \\sum (x_i - \\bar{x})^2) \\\\<BR>E(S^2) & = \\frac 1 n E\\left(\\sum (x_i - \\bar{x}^2) \\right) \\\\<BR>& = \\left(\\frac 1 n \\right) (n-1) \\sigma^2 = \\frac{n-1} n \\sigma^2<BR>\\end{align*}<BR>

and from this last line we see that in order to obtain an unbiased estimate of LaTeX Code:  \\sigma^2  , the maximum likelihood (for normal distributions) estimator LaTeX Code:  S^2  needs to be multiplied by (n)/(n-1) to get

LaTeX Code: <BR>\\frac 1 {n-1} \\sum (x_i - \\bar{x})^2)<BR>
  Reply With Quote
Old Jun24-09, 01:06 PM       Last edited by musicgold; Jun24-09 at 01:14 PM..            #7
musicgold

musicgold is Offline:
Posts: 66
Re: Expected value of sample variance

Statdad,

Thanks a lot. That is what I was looking for. Though some steps are not crystal clear to me, I can dig up more to understand them.

The attached file shows more detail calculations. I found it here:
http://journal.lib.uoguelph.ca/index...ewFile/407/660

Thanks again,

MG.
Attached Files
File Type: doc Biased to unbiased estimator.doc (30.0 KB, 5 views)
  Reply With Quote
Old Jun24-09, 01:29 PM                  #8
musicgold

musicgold is Offline:
Posts: 66
Re: Expected value of sample variance

Statdad

I am not clear about just one step.

How do I get

LaTeX Code:   (\\left(\\mu^2 + \\sigma^2\\right)  from LaTeX Code:  E (x_i^2)


Thanks

MG.

P.S. How do you manage to write so many equations efficiently using LaTex? Do you have an advanced editor?
  Reply With Quote
Old Jun24-09, 01:56 PM                  #9
statdad

statdad is Offline:
Posts: 702
Recognitions:
Homework Helper Homework Helper
Re: Expected value of sample variance

First:
Since
LaTeX Code: <BR>Var(X) = \\sigma^2 = E(X - \\mu)^2 = E(X^2) - \\mu^2<BR>

a simple re-arrangement gives

LaTeX Code: <BR>E(X^2) = \\sigma^2 + \\mu^2<BR>

Second question: if you want to have several equations nicely aligned inside a display, use the \begin{align*} and \end{align*} pair inside the tex delimiters. Without the tex info, if i have

f(x) & = x^2 + 5x + 6 \\
& = (x+3)(x+2)

inside the delimiters, the compiled result is

LaTeX Code: <BR>\\begin{align*}<BR>f(x) & = x^2 + 5x + 6 \\\\<BR>& = (x+3)(x+2)<BR>\\end{align*}<BR>

* the "&" sign causes the equations to be aligned at the start of the next symbol ("=" in my
example)
* the "\\" terminates a line and tells tex to begin a new line

If you click on any displayed formula you should see, in a pop-up window, the underlying code.

Edited to note: some older tex manuals will discuss the use of the "eqarray" (I think I have the name correct, but since I don't use it I'm not going to claim 100% accuracy here) environment for doing what I've done
with align*. Don't use eqarray - the spacing is (to state it as nicely as possible) horrific.
  Reply With Quote
Old Jun25-09, 03:09 PM       Last edited by musicgold; Jun25-09 at 03:17 PM..            #10
musicgold

musicgold is Offline:
Posts: 66
Re: Expected value of sample variance

Statdad,

Thanks a lot. I really appreciate your help.

Also,

LaTeX Code: <BR>\\begin{align*}<BR><BR>Var (X) & = E [ X -   E (X) ]^2 \\\\<BR> & =  E [ X^2 - 2X   E(X) + E(X)^2] \\\\<BR> & = E(X^2) - 2 E(X)  E(X) + E(X)^2 \\\\<BR> & = E(X^2) - 2 E(X)^2 + E(X)^2 \\\\<BR> & = E (X^2) - E(X)^2.<BR><BR><BR>\\end{align*}<BR><BR>
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Expected value of sample variance
Thread Thread Starter Forum Replies Last Post
Sample variance jackiefrost Set Theory, Logic, Probability, Statistics 8 Apr10-09 05:34 AM
Help with proof of sample variance fadecomic Set Theory, Logic, Probability, Statistics 1 Mar18-09 04:02 PM
Sample mean and sample variance Shackman Calculus & Beyond 1 Feb20-08 09:40 AM
Expected Value, Expected Variance,covariance prodicalboxer General Math 0 Oct7-07 02:04 PM
statistics: sample median, means, s.d. vs sample size jhson114 Precalculus Mathematics 2 Oct25-05 06:57 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image