Grouped Data Calculator

Enter the classes and their frequencies to estimate the mean, median and mode.

Class intervals separated by commas, such as 10-20.

One whole number for each class, in the same order.

Try

Result

You entered{0 to 10: 5, 10 to 20: 8, 20 to 30: 7}\left\{ 0\text{ to }10:\ 5,\ 10\text{ to }20:\ 8,\ 20\text{ to }30:\ 7 \right\}

estimated mean=16, estimated median=16.25, modal class=10-20\displaystyle \text{estimated mean} = 16,\ \text{estimated median} = 16.25,\ \text{modal class} = \text{10-20}

Estimated mode

17.5\displaystyle 17.5

Total frequency

20\displaystyle 20

Estimated standard deviation (population)

7.681146\displaystyle 7.681146

Median class

10 to 20\displaystyle 10\text{ to }20
Show the work
  1. Class midpoints

    Grouped data does not keep the individual values, so each class is represented by its midpoint: the mean of its lower bound LL and upper bound UU.

    Using x=L+U2x = \frac{L + U}{2}

    0+102=5, 10+202=15, 20+302=25\frac{0 + 10}{2} = 5,\ \frac{10 + 20}{2} = 15,\ \frac{20 + 30}{2} = 25
  2. Frequency times midpoint

    Multiply each midpoint xx by its frequency ff to estimate the total of the values in that class, then add these estimates.

    ∑fx=5×5+8×15+7×25=25+120+175=320\begin{aligned} \sum fx &= 5 \times 5 + 8 \times 15 + 7 \times 25 \\ &= 25 + 120 + 175 \\ &= 320 \end{aligned}
  3. Estimated mean from a frequency table

    Divide the estimated total by the total frequency. Here ∑f=20\sum f = 20.

    xˉ=∑fx∑f=32020=16\begin{aligned} \bar{x} &= \frac{\sum fx}{\sum f} \\ &= \frac{320}{20} \\ &= 16 \end{aligned}
  4. Median class

    The median is the value halfway through the data, at position n2=10\frac{n}{2} = 10. The cumulative frequencies are 5, 13, 205,\ 13,\ 20, and the first one that reaches 10 belongs to the class 10-20, so that is the median class.

  5. Median by interpolation

    Assume the values are spread evenly through the median class. Here L=10L = 10 is its lower bound, F=5F = 5 the cumulative frequency before it, f=8f = 8 its frequency and w=10w = 10 its width.

    m=L+n2−Ff×w=10+10−58×10=16.25\begin{aligned} m &= L + \frac{\frac{n}{2} - F}{f} \times w \\ &= 10 + \frac{10 - 5}{8} \times 10 \\ &= 16.25 \end{aligned}
  6. Modal class

    The modal class is the class with the highest frequency: 10-20. Within it, the mode is estimated from the frequencies on either side, where f1=8f_1 = 8 is its own, f0=5f_0 = 5 the class before and f2=7f_2 = 7 the class after (0 where there is none).

    M=L+f1−f02f1−f0−f2×w=10+8−52×8−5−7×10=10+34×10=17.5\begin{aligned} M &= L + \frac{f_1 - f_0}{2f_1 - f_0 - f_2} \times w \\ &= 10 + \frac{8 - 5}{2 \times 8 - 5 - 7} \times 10 \\ &= 10 + \frac{3}{4} \times 10 \\ &= 17.5 \end{aligned}
  7. Result

    So the estimated mean is 1616, the estimated median is 16.2516.25 and the modal class is 10-20.

Worked examples