Grouped Data Mean Calculator
If you do not have the raw observations but only a frequency table ("5 people aged 20-30, 12 people aged 30-40"), you cannot simply add the values up and divide. In that situation each class is represented by its midpoint, and the mean is computed as a weighted mean in the form Σf·m / Σf.
This calculator reads each line as "lower-upper: frequency", shows the worksheet with the midpoint, f·m, and f·m² columns explicitly, and computes the variance, standard deviation, median-class interpolation, the Czuber mode estimate, and the quartiles alongside the grouped mean. Because every step is visible, checking a homework or exam solution is straightforward.
Grouped Data Formulas
Class midpoint: mᵢ = (lower boundᵢ + upper boundᵢ) / 2 Grouped mean: x̄ = Σfᵢ·mᵢ / Σfᵢ = Σfᵢ·mᵢ / N Variance (sample): s² = [Σfᵢ·mᵢ² − (Σfᵢ·mᵢ)² / N] / (N − 1) Variance (population): σ² = [Σfᵢ·mᵢ² − (Σfᵢ·mᵢ)² / N] / N Standard deviation: s = √s² Median: Md = L + [(N/2 − F) / f]·h Quartiles: Qₖ = L + [(k·N/4 − F) / f]·h Mode (Czuber): Mo = L + [d₁ / (d₁ + d₂)]·h, d₁ = f − f₋₁, d₂ = f − f₊₁
L is the lower bound of the class concerned, F the cumulative frequency before that class, f the frequency of the class, and h the class width. The formulas assume that the observations are spread evenly within each class.
How to Calculate
- Write one class per line: lower bound - upper bound : frequency (example: 20-30: 5).
- You do not need to sort the classes; the calculator orders them for you.
- Choose whether the data is a sample or the entire population — this sets the denominator of the variance (N−1 or N).
- Check the midpoint, f·m, and f·m² columns in the worksheet; you can write your homework solution straight from those columns.
- Look at which class was used in the median and mode rows; the interpolation step shows the formula with the values substituted in.
- Compare the mean with the median to judge whether the distribution is skewed.
Worked Examples
Mean and standard deviation from an age distribution
For 50 people spread across five age classes, the midpoints are 25, 35, 45, 55, and 65. Since Σf·m = 2,240 and Σf·m² = 106,850, the grouped mean is 2,240 / 50 = 44.80. The sample variance is (106,850 − 100,352) / 49 = 132.61 and the standard deviation is 11.52. The median class is the 40–50 range, interpolation gives a median of 44.44, and the Czuber mode is 44.
Grouped mean (x̄): 44.80 · Total frequency (N): 50 · Number of classes: 5
Exam scores (as a population)
Because the entire population was measured, the population formula is selected: with Σf·m = 2,780 the mean is 55.60, the population variance is (175,400 − 154,568) / 50 = 416.64, and the population standard deviation is 20.41. The median class is the 40–60 range and the median is 58.67; since the mean is smaller than the median, the distribution is left-skewed. The modal class is 60–80 and the Czuber estimate is 64.76.
Grouped mean (x̄): 55.60 · Total frequency (N): 50 · Number of classes: 5
Monthly income classes (thousand TL)
In the income distribution of 92 households, Σf·m = 2,690, so the mean income is 29.24 thousand TL and the standard deviation is 12.42 thousand TL. The median class is the 20–30 range and the median is 26.86; the mean exceeding the median reflects the typically right-skewed shape of income distributions. With a coefficient of variation of 42.5%, the relative variability is high.
Grouped mean (x̄): 29.24 · Total frequency (N): 92 · Number of classes: 6