Page 1 of 2 12 LastLast
Results 1 to 15 of 19
Like Tree2Thanks

Math Help - Standard deviation question

  1. #1
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Standard deviation question

    I have a mean and an SD from a set of 20 results but i do not have 20 seperate results. Is there a way I can calculate a new SD if I add one more result to the result set by using the previous Standard deviation?
    Thanks
    Michael
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Jan 2008
    From
    UK
    Posts
    484
    Thanks
    65

    Re: Standard deviation question

    ...delete please...
    Last edited by a tutor; August 10th 2012 at 01:24 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor ebaines's Avatar
    Joined
    Jun 2008
    From
    Illinois
    Posts
    1,021
    Thanks
    280

    Re: Standard deviation question

    Need to be careful here, since the mean of the population changes with the addition of the new data point. Starting with

     \sigma_n^2 = \frac 1 {(n-1)} \sum_{i=1}^n (x_i - \mu_n)^2 it turns out that with the new data point:

    \sum_{i=1}^n (x_i - \mu_{n+1})^2 = \sum_{i=1}^n (x_i - \mu_{n})^2 + n(\mu_{n+1}-\mu_n)^2

    Hence  \sum_{i=1}^{n+1} (x_i - \mu_{n+1})^2 = \sum_{i=1}^n (x_i - \mu_{n})^2 + n(\mu_{n+1}-\mu_n)^2 + (x_{n+1} - \mu_{n+1})^2

    Now you can find the new standard deviation from  \sigma_{n+1}^2 = \frac 1 n \sum_{i=1}^{n+1} (x_i - \mu_n)^2.
    Thanks from a tutor
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    Many thanks for the replies guys. If you could explain layman terms I would be ever so grateful, I really do not understand the symbols and what they mean. I'm a web developer who has been handed this task. I can work out SD easily from a result set but the above problem is above my level of understanding.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor ebaines's Avatar
    Joined
    Jun 2008
    From
    Illinois
    Posts
    1,021
    Thanks
    280

    Re: Standard deviation question

    Quote Originally Posted by mickyc1 View Post
    ...If you could explain layman terms I would be ever so grateful...
    OK:

    Let  \sigma_1 be the original standard deviation,  \mu_1 be the original mean, and N = the number of data points you started with (20 in your case). Let x be the new data point that you are now going to include. You are interested in calculating the new standard deviation  \sigma_2 and mean \mu_2. The calculation is:

    1.  \mu_2 = \frac {N \mu_1 + x} {N+1}

    2.  \sigma_2 = \sqrt {\frac 1 {N} \left( (N-1)\sigma_1^2+ N(\mu_2 - \mu_1)^2 + (x-\mu_2)^2 \right)}

    Hope this helps.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    Absolutely fantastic ebaines, that is perfectly explained.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    Something must be wrong with my calculations! I have 22 results with a mean of 4.33 and an SD of of 0.327. A new result is added of 5. The SD I get from that is 1.05 but that looks totally wrong. Any ideas?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Aug 2011
    Posts
    38
    Thanks
    1

    Re: Standard deviation question

    delete please
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Junior Member
    Joined
    Aug 2011
    Posts
    38
    Thanks
    1

    Re: Standard deviation question

    delete please...
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Senior Member
    Joined
    Jan 2008
    From
    UK
    Posts
    484
    Thanks
    65

    Re: Standard deviation question

    Is there an error in ebaines formula?

    If the standard deviation were calculated using s^2=\frac{1}{n-1}\left(\Sigma x^2- \frac{1}{n}(\Sigma x)^2 \right) then if we are given
    standard deviation =s
    mean = m
    sample size = n
    and extra value = x

    then I get

    \text{ new s }= s'=\sqrt{\frac{1}{n}\left((n-1)s^2+m^2n+x^2-\frac{1}{n+1}(mn+x)^2\right)}

    \text{ new m }= m' = \frac{mn+x}{n+1}
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    Quote Originally Posted by a tutor View Post
    Is there an error in ebaines formula?

    If the standard deviation were calculated using s^2=\frac{1}{n-1}\left(\Sigma x^2- \frac{1}{n}(\Sigma x)^2 \right) then if we are given
    standard deviation =s
    mean = m
    sample size = n
    and extra value = x

    then I get

    \text{ new s }= s'=\sqrt{\frac{1}{n}\left((n-1)s^2+m^2n+x^2-\frac{1}{n+1}(mn+x)^2\right)}

    \text{ new m }= m' = \frac{mn+x}{n+1}
    Using the values I defined above, could you show me how to apply your above formula?
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Senior Member
    Joined
    Jan 2008
    From
    UK
    Posts
    484
    Thanks
    65

    Re: Standard deviation question

    Sub everything in..

    \text{ new s }= s'=\sqrt{\frac{1}{22}\left((22-1)\times 0.327^2+4.33^2\times 22+5^2-\frac{1}{22+1}(4.33\times 22+5)^2\right)}


    and then calculate it. You should get 0.3486918155 which seems reasonable...I think.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    Quote Originally Posted by a tutor View Post
    Sub everything in..

    \text{ new s }= s'=\sqrt{\frac{1}{22}\left((22-1)\times 0.327^2+4.33^2\times 22+5^2-\frac{1}{22+1}(4.33\times 22+5)^2\right)}


    and then calculate it. You should get 0.3486918155 which seems reasonable...I think.

    I'm getting 4.5, I'm obviously doing the calculations wrongly!
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Senior Member
    Joined
    Jan 2008
    From
    UK
    Posts
    484
    Thanks
    65

    Re: Standard deviation question

    It's a bit awkward on a pocket calculator.

    Take a look at this instead.

    (1/22*((22-1)*0.327^2+4.33^2*22+5^2-1/(22+1)*(4.33*22+5)^2))^(1/2) - Wolfram|Alpha
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Newbie
    Joined
    Aug 2012
    From
    Ireland
    Posts
    8

    Re: Standard deviation question

    This is probably a real noob question but in what order do I do the separate calculations? Could you show me step by step. Maths is not my strong point, apologies.
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Standard Deviation question
    Posted in the Statistics Forum
    Replies: 1
    Last Post: November 23rd 2009, 10:34 PM
  2. Help with mean and standard deviation question.
    Posted in the Statistics Forum
    Replies: 2
    Last Post: November 18th 2009, 10:53 PM
  3. standard deviation question
    Posted in the Statistics Forum
    Replies: 12
    Last Post: August 7th 2009, 08:07 PM
  4. Standard Deviation question?
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: October 8th 2007, 08:45 PM
  5. question about standard deviation
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: October 7th 2005, 05:16 PM

Search Tags


/mathhelpforum @mathhelpforum