• Foundation
  • About 16 min
  • 5 practice questions

Mean, median and mode of grouped data

Find the mean of grouped data by the direct and step-deviation methods, and the median and mode using the class-interval formulas.

If something looks wrong, please tell us.

Large data sets are usually summarised in classes such as 0-10, 10-20 and so on, with a frequency for each class. The individual values are no longer known, so we use one representative value per class and some simple formulas. The answers are estimates, but they are the standard estimates used everywhere.

Class marks and the mean

The class mark (mid-point) of a class is (lower limit + upper limit)/2; for 20-30 it is 25. Treat every value in the class as if it were the class mark. Then the mean is x̄ = Σfx/Σf, where x is now the class mark. In a class written 20-30, a value of exactly 30 belongs to the next class, 30-40.

The step-deviation method

With large class marks the products fx get big. Choose an assumed mean A (usually a middle class mark) and the class width h, and work with u = (x − A)/h, which are small whole numbers such as −2, −1, 0, 1, 2. Then x̄ = A + h × (Σfu/Σf). This gives exactly the same answer with smaller numbers.

Median and mode of grouped data

For the median, find N/2 and locate the median class: the first class whose cumulative frequency reaches N/2. Then use median = l + ((N/2 − cf)/f) × h, where l is the lower limit of the median class, cf the cumulative frequency of the class before it, f its frequency and h its width. For the mode, the modal class is the class with the highest frequency, and mode = l + ((f₁ − f₀)/(2f₁ − f₀ − f₂)) × h, where f₁ is the modal class frequency and f₀, f₂ are the frequencies of the classes just before and after it.

Mean = A + h(Σfu/Σf) with u = (x − A)/h. Median = l + ((N/2 − cf)/f)h. Mode = l + ((f₁ − f₀)/(2f₁ − f₀ − f₂))h.

Worked example: one table, three measures

Marks of 40 students
Class0-1010-2020-3030-4040-50
Frequency5101564
Class mark x515253545
u = (x − 25)/10−2−1012

Mean, direct method. Σfx = 25 + 150 + 375 + 210 + 180 = 940 and N = 40, so x̄ = 940/40 = 23.5.

Mean, step-deviation method. With A = 25 and h = 10, Σfu = −10 − 10 + 0 + 6 + 8 = −6. So x̄ = 25 + 10 × (−6/40) = 25 − 1.5 = 23.5, the same answer.

Median. N/2 = 20. Cumulative frequencies are 5, 15, 30, 36, 40, so the median class is 20-30 (the first to reach 20). Here l = 20, cf = 15, f = 15, h = 10, and median = 20 + ((20 − 15)/15) × 10 = 20 + 10/3 ≈ 23.33.

Mode. The modal class is 20-30 with f₁ = 15, f₀ = 10, f₂ = 6. Mode = 20 + ((15 − 10)/(30 − 10 − 6)) × 10 = 20 + 50/14 ≈ 23.57.

Common mistakes

  • Using the class limits instead of the class marks for the mean.
  • Taking cf as the cumulative frequency of the median class itself; it must be the class before.
  • Choosing the median class by the largest frequency; that is the modal class, not the median class.
  • Forgetting to multiply by h at the end of the step-deviation method.

Key takeaways. Grouped data are handled through class marks. The step-deviation method gives the same mean with smaller numbers. For the median, find N/2 and use the cumulative frequency of the class before the median class; for the mode, use the frequencies on both sides of the modal class.

Check your understanding

  1. 1. What is the class mark of the class 30-40?

    1. 30
    2. 40
    3. 10
    4. 35
    Show answer

    Answer: D. Class mark = (30 + 40)/2 = 35.

  2. 2. Classes 0-4, 4-8, 8-12 have frequencies 2, 5, 3. What is the mean?

    1. 6.4
    2. 6
    3. 6.2
    4. 5.8
    Show answer

    Answer: A. Class marks 2, 6, 10. Σfx = 4 + 30 + 30 = 64 and N = 10, so the mean is 6.4.

  3. 3. Using the step-deviation method with A = 50 and h = 10, Σfu = 12 and Σf = 40. What is the mean?

    1. 50.3
    2. 53
    3. 62
    4. 51.2
    Show answer

    Answer: B. Mean = 50 + 10 × (12/40) = 50 + 3 = 53.

  4. 4. For a median class 40-50, N = 50, the cumulative frequency before it is 20 and its frequency is 10. What is the median?

    1. 45
    2. 40
    3. 42.5
    4. 50
    Show answer

    Answer: A. Median = 40 + ((25 − 20)/10) × 10 = 45.

  5. 5. The modal class is 20-25 with frequency 12; the classes before and after have frequencies 8 and 6. What is the mode?

    1. 21
    2. 22
    3. 23
    4. 24
    Show answer

    Answer: B. Mode = 20 + ((12 − 8)/(24 − 8 − 6)) × 5 = 20 + (4/10) × 5 = 22.

Privacy · Terms · Refunds · Delivery