1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Prove the sample variance formula.

  1. Sep 8, 2010 #1
    1. The problem statement, all variables and given/known data
    Prove that the sample variance of a sample is given by
    S2 = [tex]\frac{\sum^{n}_{j=1}x_j^2 - \frac{1}{n} (\sum^{n}_{j=1}x_j)^2}{n-1}[/tex]

    2. Relevant equations


    3. The attempt at a solution

    For my purposes it is sufficient to show that:

    [tex]\sum^{n}_{j=1}(x_j -x_j^2) = \sum^{n}_{j=1}x_j^2 - \frac{1}{n}\left(\sum^{n}_{j=1}x_j\right)^2[/tex]

    I got as far as this:

    [tex]= \sum^{n}_{j=1}x_j^2 - \sum^{n}_{j=1}2\bar{x}x_j + \sum^{n}_{j=1}\bar{x}^2[/tex]

    I need help getting from there to here:

    [tex] = \sum^{n}_{j=1}x_j^2 - \frac{1}{n}\left(\sum^{n}_{j=1}x_j\right)^2[/tex]

    Thanks in advance and I apologize for any coding error.
    Last edited: Sep 8, 2010
  2. jcsd
  3. Sep 8, 2010 #2


    User Avatar
    Homework Helper

    Hint: remember that [itex] \overline x [/itex] is a constant and can be removed from summations.
  4. Sep 8, 2010 #3
    So if I put the [itex] \overline x [/itex]'s in front

    [tex]= \sum^{n}_{j=1}x_j^2 - 2\bar{x}\sum^{n}_{j=1}x_j + \bar{x}^2\sum^{n}_{j=1}[/tex]

    and rearrange it I get

    [tex]= \sum^{n}_{j=1}x_j^2 +\bar{x}^2\sum^{n}_{j=1} - 2\bar{x}\sum^{n}_{j=1}x_j[/tex]

    My instincts tell me to factor out the [itex] \overline x [/itex] but I don't see how that could help.
  5. Sep 8, 2010 #4


    User Avatar
    Homework Helper


    \sum_{i=1}^n \overline x_i = \overline x_i \sum_{i=1}^N 1

    (you forgot to include the 1: what does the above sum equal?


    \overline x = \frac 1 n \sum_{i=1}^n x_i

    so what must

    \sum_{i=1}^n x_i

  6. Sep 8, 2010 #5
    So, [tex]\sum_{i=1}^n x_i[/tex] must be equal to [tex]n\overline x[/tex] correct?

    The sum from the first sum is n, correct?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook