Curvingo · Made in India

Glossary

Select one of the keywords on the left…

StatisticsMean of Grouped Data

Reading time: ~45 min

The plank balanced at 5, and the arithmetic agrees. Riya's list repeats some scores — 2 appears three times and 10 twice — so it is quicker to write it as a table of values x_i and their frequencies f_i:

Pani-puris eaten (x_i)123457910
Number of friends (f_i)13111112

Instead of adding 2 three times, multiply: 2 \times 3 = 6. Doing this for every column gives the total number of pani-puris, 1 + 6 + 3 + 4 + 5 + 7 + 9 + 20 = . Adding the frequencies counts the friends: 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 = . So the mean is 55 \div 11 = 5, exactly where the plank balanced.

The same recipe works for any table. Suppose the values x_1, x_2, \ldots, x_n occur f_1, f_2, \ldots, f_n times. Then all the observations together add up to f_1x_1 + f_2x_2 + \cdots + f_nx_n, and there are f_1 + f_2 + \cdots + f_n of them. So the mean \bar{x} is

\bar{x} = \dfrac{f_1x_1 + f_2x_2 + \cdots + f_nx_n}{f_1 + f_2 + \cdots + f_n}

The Greek capital letter Σ (sigma) is shorthand for "add up all of these", so the same formula is written

\bar{x} = \dfrac{\sum_{i=1}^{n} f_i x_i}{\sum_{i=1}^{n} f_i}

or, when it is clear that i runs from 1 to n, simply \bar{x} = \dfrac{\sum f_i x_i}{\sum f_i}.

Now a real class. Thirty students sat a 100-mark mathematics paper.

Example 1 : The marks obtained by 30 students of Class X of a school in a mathematics paper of 100 marks are given in the table below. Find the mean of the marks obtained by the students.

Marks obtained (x_i)10203640505660707280889295
Number of students (f_i)1134324411231

Solution : We need each mark x_i multiplied by its frequency f_i, so we add an f_i x_i column, as in Table 13.1.

Table 13.1

Marks obtained (x_i)Number of students (f_i)f_i x_i
10110
20120
363108
404160
503150
562112
604240
704280
72172
80180
882176
923276
95195
Total\sum f_i = 30\sum f_i x_i = 1779

So \bar{x} = \dfrac{\sum f_i x_i}{\sum f_i} = \dfrac{1779}{30} =

The mean mark is 59.3. Keep this number in mind: in a moment the very same marks will give a slightly different answer.

From a List to Classes

Thirty marks fit into one table. Three thousand would not. With large data sets we sort the values into class intervals and record only how many fall into each one. Let's group the marks of Example 1 into classes of width 15: 10 – 25, 25 – 40, 40 – 55, and so on up to 85 – 100.

One snag: four students scored exactly 40, and 40 is where 25 – 40 ends and 40 – 55 begins. Each student must be counted in exactly one class, so we follow a fixed rule: a value equal to the upper limit of a class goes into the next class. A mark of 40 therefore counts in 40 – 55, not in 25 – 40.

Drag each mark into its class.

40
36
55
25
50
62
25 – 40
40 – 55
55 – 70

Sorting all 30 marks this way gives a grouped frequency distribution:

Table 13.2

Class interval10 - 2525 - 4040 - 5555 - 7070 - 8585 - 100
Number of students237666

Grouping has a price: the table no longer says what each student scored, only which class they are in. To work out a mean, every class needs one number to stand for all its members. The fairest choice is the middle of the class — some students in it scored a little less, some a little more, and on balance those differences roughly cancel. So we assume that the frequency of each class is centred at its mid-point, which is called its class mark:

\text{Class mark} = \dfrac{\text{Upper class limit} + \text{Lower class limit}}{2}

For the class 10 – 25 the class mark is \dfrac{10 + 25}{2} = . The other class marks are found the same way, and they are listed in Table 13.3, where they play the part of the x_i: the ith class has class mark x_i and frequency f_i. Now the mean is computed exactly as in Example 1.

Table 13.3

Class intervalNumber of students (f_i)Class mark (x_i)f_i x_i
10 - 25217.535.0
25 - 40332.597.5
40 - 55747.5332.5
55 - 70662.5375.0
70 - 85677.5465.0
85 - 100692.5555.0
Total\sum f_i = 30\sum f_i x_i = 1860.0

Adding the last column gives \sum f_i x_i = 1860, so

\bar{x} = \dfrac{\sum f_i x_i}{\sum f_i} = \dfrac{1860}{30} =

Using the class marks as they are, like this, is called the direct method.

But wait. These are the same 30 students as in Example 1, and there the mean was 59.3. Which answer is right? Each grey dot below is one student, placed at their exact mark; the shaded bands are the six classes. The blue line is where the dots balance — their mean. Squash every class onto its class mark and watch the blue line.

Grouping moved the students: a 40 now counts as 47.5, a 70 as 77.5, a 36 as 32.5. On balance the moves were upwards, so the balance point drifted from 59.3 to 62. So 59.3 is the exact mean, and 62 is an mean — the price of the mid-point assumption. Once the raw marks are thrown away, 62 is the best we can do, and for large data sets it is usually very close to the truth.

The direct method is quick here. But when the x_i and f_i are large, the products f_i x_i get long and error-prone. There is a way to shrink the numbers first.

The Assumed Mean Method

We cannot change the frequencies — they are what they are. But we can make every x_i smaller by the same number from each of them.

Step 1. Choose one of the x_i as the assumed mean and call it a. A value near the middle of the list keeps the new numbers small, so for Table 13.3 we could take a = 47.5 or a = 62.5. Let's take a = 47.5.

Step 2. Find the deviation of each x_i from a, that is, the d_i = x_i - a = x_i - 47.5.

Step 3. Multiply each d_i by its frequency f_i, and add up all the f_i d_i. Table 13.4 shows the working.

Table 13.4

Class intervalNumber of students (f_i)Class mark (x_i)d_i = x_i - 47.5f_i d_i
10 - 25217.5-30-60
25 - 40332.5-15-45
40 - 55747.500
55 - 70662.51590
70 - 85677.530180
85 - 100692.545270
Total\sum f_i = 30\sum f_i d_i = 435

The mean of the deviations is \bar{d} = \dfrac{\sum f_i d_i}{\sum f_i}. How is it related to the mean \bar{x} that we want? Every d_i is its x_i with a taken away, so we expect the mean of the d_i to be the mean of the x_i with a taken away. The algebra confirms it:

\bar{d} = \dfrac{\sum f_i d_i}{\sum f_i} = \dfrac{\sum f_i (x_i - a)}{\sum f_i}

= \dfrac{\sum f_i x_i}{\sum f_i} - \dfrac{a \sum f_i}{\sum f_i}

= \bar{x} - a

So, to get \bar{x} back, we a:

\bar{x} = a + \bar{d} = a + \dfrac{\sum f_i d_i}{\sum f_i}

From Table 13.4, a = 47.5, \sum f_i d_i = 435 and \sum f_i = 30, so

\bar{x} = 47.5 + \dfrac{435}{30} = 47.5 + 14.5 =

The same 62 as the direct method, with much smaller multiplications. This is the assumed mean method.

Activity 1 : Would the answer change if we picked a different a? Choose class marks from Table 13.3 as a — at least three different ones — and watch the deviations and the mean.

The mean comes out for every choice of a. That makes sense: raising a by some amount lowers every d_i — and so \bar{d} — by exactly the same amount, and a + \bar{d} stays put. So choose whichever a makes your arithmetic easiest.

The Step-Deviation Method

Look again at the d_i column of Table 13.4: −30, −15, 0, 15, 30, 45. Every one of them is a multiple of 15, which is the class size h. Dividing by h makes them smaller still, so let

u_i = \dfrac{x_i - a}{h}

With a = 47.5 and h = 15, the deviation −30 becomes u_i = , and the deviation 45 becomes . Table 13.5 finishes the working.

Table 13.5

Class intervalf_ix_id_i = x_i - au_i = \frac{x_i - a}{h}f_i u_i
10 - 25217.5-30-2-4
25 - 40332.5-15-1-3
40 - 55747.5000
55 - 70662.51516
70 - 85677.530212
85 - 100692.545318
Total\sum f_i = 30\sum f_i u_i = 29

Let \bar{u} = \dfrac{\sum f_i u_i}{\sum f_i}. Each u_i is a deviation divided by h, so \bar{u} should be the mean deviation divided by h:

\bar{u} = \dfrac{\sum f_i \left(\frac{x_i - a}{h}\right)}{\sum f_i} = \dfrac{1}{h} \cdot \dfrac{\sum f_i (x_i - a)}{\sum f_i}

= \dfrac{1}{h}\left(\bar{x} - a\right)

So h\bar{u} = \bar{x} - a, which gives

\bar{x} = a + h\bar{u} = a + h\left(\dfrac{\sum f_i u_i}{\sum f_i}\right)

Substituting a = 47.5, h = 15, \sum f_i u_i = 29 and \sum f_i = 30 from Table 13.5:

\bar{x} = 47.5 + 15 \times \dfrac{29}{30} = 47.5 + 14.5 =

This is the step-deviation method. Three methods, one answer:

The three methods for the mean of grouped data:

\text{Direct: } \bar{x} = \dfrac{\sum f_i x_i}{\sum f_i}

\text{Assumed mean: } \bar{x} = a + \dfrac{\sum f_i d_i}{\sum f_i}

\text{Step deviation: } \bar{x} = a + h\left(\dfrac{\sum f_i u_i}{\sum f_i}\right)

where d_i = x_i - a and u_i = \dfrac{x_i - a}{h}.

A few things to remember:

  • The step-deviation method is handy when all the d_i have a common factor.
  • All three methods give the same mean: the assumed mean and step-deviation methods are just the direct method with easier numbers.
  • \bar{x} = a + h\bar{u} holds for any numbers a and h \neq 0, as long as u_i = \dfrac{x_i - a}{h} — they need not be a class mark and the class size.

Let's use all three methods on the same data.

Example 2 : The table below gives the percentage distribution of female teachers in the primary schools of rural areas of various states and union territories (U.T.) of India. Find the mean percentage of female teachers by all the three methods discussed in this section.

Percentage of female teachers15 - 2525 - 3535 - 4545 - 5555 - 6565 - 7575 - 85
Number of States/U.T.61174421

Source : Seventh All India School Education Survey

Solution : First, the class marks x_i (Table 13.6):

Table 13.6

Percentage of female teachersNumber of States /U.T. (f_i)x_i
15 - 25620
25 - 351130
35 - 45740
45 - 55450
55 - 65460
65 - 75270
75 - 85180

Take a = 50 and h = 10, so that d_i = x_i - 50 and u_i = \dfrac{x_i - 50}{10}. Table 13.7 has every column we need.

Table 13.7

Percentage of female teachersNumber of states/U.T. (f_i)x_id_i = x_i - 50u_i = \frac{x_i - 50}{10}f_i x_if_i d_if_i u_i
15 - 25620-30-3120-180-18
25 - 351130-20-2330-220-22
35 - 45740-10-1280-70-7
45 - 554500020000
55 - 65460101240404
65 - 75270202140404
75 - 8518030380303
Total351390-360-36

From the totals, \sum f_i = , \sum f_i x_i = , \sum f_i d_i = and \sum f_i u_i = -36.

Direct method: \bar{x} = \dfrac{\sum f_i x_i}{\sum f_i} = \dfrac{1390}{35} =

Assumed mean method: \bar{x} = a + \dfrac{\sum f_i d_i}{\sum f_i} = 50 + \dfrac{-360}{35} = 50 - 10.29 =

Step-deviation method: \bar{x} = a + h\left(\dfrac{\sum f_i u_i}{\sum f_i}\right) = 50 + 10 \times \dfrac{-36}{35} = 50 - 10.29 =

So the mean percentage of female teachers in these schools is 39.71 — the same by every method.

Tip

Choosing a method. All three methods give the same result, so choose by the size of the numbers. Small x_i and f_i: the direct method is quickest. Large values: use the assumed mean or the step-deviation method. Even when the class sizes are unequal and the x_i are large, step deviation still works if you take for h a suitable divisor of the d_i.

Example 3 : The distribution below shows the number of wickets taken by bowlers in one-day cricket matches. Find the mean number of wickets by choosing a suitable method. What does the mean signify?

Number of wickets20 - 6060 - 100100 - 150150 - 250250 - 350350 - 450
Number of bowlers75161223

Solution : The class sizes are unequal here, and the x_i are large. Step deviation still works: take a = 200 and h = 20. (One u_i comes out as a decimal, −3.75, and that is fine — the formula holds for any h.) This gives Table 13.8.

Table 13.8

Number of wickets takenNumber of bowlers (f_i)x_id_i = x_i - 200u_i = \frac{d_i}{20}u_i f_i
20 - 60740-160-8-56
60 - 100580-120-6-30
100 - 15016125-75-3.75-60
150 - 25012200000
250 - 3502300100510
350 - 45034002001030
Total45-106

So \bar{u} = \dfrac{-106}{45}, and

\bar{x} = 200 + 20 \times \left(\dfrac{-106}{45}\right) = 200 - 47.11 =

On average, each of these 45 bowlers took about 153 wickets in one-day cricket.

Activity 2: your class in numbers

Split the class into three groups, one task each:

  1. Collect everyone's marks in the latest school mathematics exam and form a grouped frequency distribution.
  2. Record your city's daily maximum temperature for 30 days and group the data.
  3. Measure the height of every student in the class (in cm) and group the data.

Each group then finds the mean of its data by whichever method suits its numbers best.

Speed Round: Class Marks and Deviations

Every mean calculation leans on two quick skills: finding a class mark, and turning x_i into u_i = \dfrac{x_i - a}{h}. Do them in your head.

Get five right to move on.

Sina