Table : TABLE 12-6. Calculating the Within-Groups Sum of Squares The within-groups sum of squares is calculated by taking each score and subtracting the mean of the sample from which it comes—not the grand mean—to create deviations, then squaring the deviations and summing the squared deviations.
SampleX(XM)(XM)2
Foraging28−5.25  27.563
36  2.75    7.563
Mfor = 33.25038  4.75  22.563
31−2.25    5.063
Farming32−3.000  9.000
33−2.000  4.000
Mfarm = 35.00040  5.00025.000
Natural resources47−0.333  0.111
43−4.33318.775
Mnr = 47.33352  4.66721.781
Industrial40−4.00016.000
47  3.000  9.000
Mind = 44.00045  1.000  1.000
GM = 39.385SSwithin = 167.419