Testwiki:Reference desk/Archives/Mathematics/2011 January 27

From testwiki
Jump to navigation Jump to search

Template:Error:not substituted

{| width = "100%"

|- ! colspan="3" align="center" | Mathematics desk |- ! width="20%" align="left" | < January 26 ! width="25%" align="center"|<< Dec | January | Feb >> ! width="20%" align="right" |Current desk > |}

Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 27

Combine Standard Deviations

I know you can combine weighted averages of non-overlapping subsets to find the average of the whole. Can you do the same to find the standard deviation of the whole? Say you had the average heights of all the boys in a class (n=30, average=60, sd=3) and all the girls in a class (n=20, average=50, sd=5). The average height of the class would be: (total height of girls + total height of boys)/(total number of students) = (50*20+60*30)/(20+30) = 56.

Can you do something similar to find the standard deviation of the whole class? 160.10.98.106 (talk) 18:21, 27 January 2011 (UTC)

You can, but it's a little more complicated:
σ=n1(σ12+μ12)+n2(σ22+μ22)n1+n2μ2
I'll leave it as an exercise to show that this works (and to check that I didn't make a mistake). -- Meni Rosenfeld (talk) 19:16, 27 January 2011 (UTC)
It's actually pretty easy: write ν:=x2=μ2+σ2 (by the definition of variance). The overall ν=p1ν1+p2ν2 just as μ=p1μ1+p2μ2, where pi:=ni/n is the "probability" for each group. So we have μ2+σ2=p1(μ12+σ12)+p2(μ22+σ22) and your formula follows immediately. --Tardis (talk) 20:58, 27 January 2011 (UTC)
This can be rewritten as
σ2=p1(σ12+(μ1μ)2)+p2(σ22+(μ2μ)2)
which show how one has to add in a bit because the averages are different Dmcq (talk) 14:55, 28 January 2011 (UTC)