ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude

Combined mean and standard deviation: merging groups and fixing wrong entries

Merge two or three groups into one combined mean and standard deviation from their sizes, means and SDs, work back to a missing group, and correct a mean and SD after a wrong entry or after adding or removing a value. All SDs are population SDs (divisor n).

Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.

You will learn to

Before you start

This lesson assumes you can find a mean and a standard deviation (SD) from a list of values; the dispersion lesson teaches that. Every SD here is a population SD, found by dividing by n, the number of values, and never by n - 1. Two facts do most of the work. The sum of the values in a group is n x mean. The sum of their squares is n x (SD^2 + mean^2), because SD^2 = (sum of squares) / n - mean^2. Groups are labelled 1, 2 and 3, with sizes n1, n2 and n3, means m1, m2 and m3, and SDs s1, s2 and s3. No member may belong to two groups. The settings include two sections of Class 12 in a Lucknow school and the workers in two units of a Surat textile firm.

The combined mean and the combined SD

Combined mean: m = (n1 x m1 + n2 x m2) / (n1 + n2); for three groups, add n3 x m3 on top and n3 below. For the combined SD, first measure each group mean from the combined mean: d1 = m1 - m and d2 = m2 - m. Then the combined SD is s = sqrt((n1 x (s1^2 + d1^2) + n2 x (s2^2 + d2^2)) / (n1 + n2)). Each bracket is the average squared distance of that group's members from the combined mean, so the formula adds up every member's squared distance and divides by the full count. For three groups, add n3 x (s3^2 + d3^2) on top and n3 below. Instead of the formula you may rebuild the sums: add the group sums n x mean and the group sums of squares n x (SD^2 + mean^2), then use SD^2 = (sum of squares) / N - mean^2 for the merged group of N members. The coefficient of variation of the merged group is CV = 100 x s / m percent.

The two-group form, and why the combined SD grows

For two groups the same result can be written as s^2 = (n1 x s1^2 + n2 x s2^2) / (n1 + n2) + n1 x n2 x (m1 - m2)^2 / (n1 + n2)^2. The first part is the size-weighted average of the two variances, the variation inside the groups. The second part is the variation between the groups, and it is zero only when m1 = m2. Because of this extra part, and because squaring gives more weight to the larger SD, the combined SD is never smaller than the size-weighted average of the group SDs, (n1 x s1 + n2 x s2) / (n1 + n2), and it is strictly larger whenever the means differ. For groups of equal size that weighted average is simply (s1 + s2) / 2. The combined SD can even beat both group SDs: two equal classes, each with an SD of 4 marks but with means of 50 and 60, merge into one group whose SD is sqrt(16 + 25) = 6.4 marks.

Fixing a wrong entry, and adding or removing a value

A mean and an SD cannot be corrected directly, but the two sums behind them can. From the figures as first worked out, find the sum = n x mean and the sum of squares = n x (SD^2 + mean^2). If a value was copied wrongly, take the wrong value out and put the right one in: in the sum, subtract the wrong value and add the right one; in the sum of squares, subtract the square of the wrong value and add the square of the right one. If a value is added, add it to the sum and its square to the sum of squares, and raise n by 1; if a value is removed, subtract both and lower n by 1. Then the new mean = sum / n and the new SD = sqrt(sum of squares / n - mean^2), always with the new n and the new mean. The same sums settle missing-group questions: subtract the known group's sum and sum of squares from the combined ones to get the other group's.

Common mistakes

Taking the simple average of the group means when the group sizes differ. Averaging the group SDs, or even the variances, and leaving out the between-group part, which gives too small a combined SD. Putting d = m1 - m2 into the first formula, where each d must be measured from the combined mean. Correcting only the sum after a wrong entry and keeping the old sum of squares; the SD stays wrong and the variance can even come out negative. Using the old mean when the new SD is worked out. Dividing by n - 1: these formulas use population SDs. Changing n when a value is only corrected, or not changing it when a value is added or removed. Squaring a group's SD but forgetting to multiply by its size.

A routine for merged groups and corrected figures

1. List n, mean and SD for each group, and check that no member is counted twice. 2. Combined mean = (sum of n x mean) / (sum of n). 3. Find each d = group mean - combined mean. 4. Combined SD = sqrt((sum of n x (SD^2 + d^2)) / (sum of n)); for two groups, cross-check with the form that has the n1 x n2 x (m1 - m2)^2 term. 5. For a wrong, added or removed value, rebuild the sum and the sum of squares, fix both, and recompute with the right count. 6. Sense-check: the combined mean lies between the group means, and the combined SD is at least the size-weighted average of the group SDs. 7. If a relative measure is wanted, finish with CV = 100 x SD / mean.

Worked examples

  1. Section A of Class 12 in a Lucknow school has 50 students whose marks have mean 70 and SD 7. Section B has 30 students with mean 86 and SD 5. Using population SDs, find the combined mean, the combined SD and the coefficient of variation of all 80 students.

    1. Combined mean = (50 x 70 + 30 x 86) / 80 = (3500 + 2580) / 80 = 6080 / 80 = 76.
    2. Distances from the combined mean: d1 = 70 - 76 = -6 and d2 = 86 - 76 = 10.
    3. Combined variance = (50 x (49 + 36) + 30 x (25 + 100)) / 80 = (4250 + 3750) / 80 = 8000 / 80 = 100, so the combined SD is 10.
    4. Cross-check with the two-group form: (50 x 49 + 30 x 25) / 80 = 3200 / 80 = 40, and 50 x 30 x 16^2 / 80^2 = 384000 / 6400 = 60; 40 + 60 = 100.
    5. CV = 100 x 10 / 76 = 13.16 percent. The combined SD of 10 is larger than both section SDs because the section means are 16 marks apart.

    Answer: Combined mean 76 marks, combined SD 10 marks, and coefficient of variation about 13.16 percent.

  2. The daily pickings of 12 workers in an Assam tea garden were recorded with mean 40 kg and SD 10 kg (population SD). Later it was found that one worker's 51 kg had been copied as 15 kg. Find the correct mean and SD.

    1. Sums from the wrong figures: sum = 12 x 40 = 480 and sum of squares = 12 x (10^2 + 40^2) = 12 x 1700 = 20400.
    2. Correct the sum: 480 - 15 + 51 = 516, so the mean = 516 / 12 = 43 kg.
    3. Correct the sum of squares: 20400 - 15^2 + 51^2 = 20400 - 225 + 2601 = 22776.
    4. Variance = 22776 / 12 - 43^2 = 1898 - 1849 = 49, so the SD = 7 kg. The SD falls because the wrong value, 15, sat far below the rest.

    Answer: The correct mean is 43 kg and the correct SD is 7 kg.

  3. A Surat textile firm has 90 workers in two units. Their daily wages have mean Rs. 620 and SD Rs. 120. Unit A has 60 workers with mean Rs. 560 and SD Rs. 100. Using population SDs, find the mean and SD of the 30 workers in unit B.

    1. Unit B's mean: (90 x 620 - 60 x 560) / 30 = (55800 - 33600) / 30 = 22200 / 30 = Rs. 740.
    2. Distances from the combined mean: unit A, 560 - 620 = -60; unit B, 740 - 620 = 120.
    3. Combined SD formula, with s2 for unit B: 90 x 120^2 = 60 x (100^2 + 60^2) + 30 x (s2^2 + 120^2), that is 1296000 = 816000 + 30 x (s2^2 + 14400).
    4. So s2^2 + 14400 = 480000 / 30 = 16000, which gives s2^2 = 1600 and s2 = Rs. 40.

    Answer: Unit B's 30 workers have a mean wage of Rs. 740 and an SD of Rs. 40.

Practice checks

  1. Three batches at a Kota coaching centre have 20, 30 and 50 students, with mean test scores of 45, 50 and 56. What is the combined mean score of all 100 students?
  2. At a Pune call centre, the 40 morning-shift staff handle a mean of 56 calls a day with SD 9, and the 50 evening-shift staff a mean of 74 calls with SD 12 (population SDs). What is the SD of the daily calls of all 90 staff together?
  3. Unit A of a Coimbatore pump factory has 30 workers with a mean wage of Rs. 500. Unit B has a mean wage of Rs. 560, and the mean wage of all the workers in both units is Rs. 520. How many workers does unit B have?
  4. The marks of 10 students in a Bhopal school were found to have mean 40 and SD 10 (population SD). Later one mark, 20, was found to have been entered as 50. What is the correct SD?
  5. Nine parcels in a Guwahati courier van have mean weight 20 kg and SD 4 kg (population SD). A parcel weighing 28 kg is taken out. What are the mean and SD of the 8 parcels left?

Sources checked