Grouped Data Standard Deviation Calculator

Enter class midpoints and frequencies to find the grouped standard deviation.

How it is calculated

Enter the class midpoints (m) and the frequency (f) of each class, separated by spaces or commas, with the same number of entries in both lists. With n = Σf, the tool computes the mean x̄ = Σ(f·m) ÷ n, then the sample standard deviation of OpenStax's grouped-frequency-table formula, s = √( Σ f·(m − x̄)² ÷ (n − 1) ), and, labeled, the population form σ = √( Σ f·(m − x̄)² ÷ n ) for a table that holds the whole population. Both variances are shown too. A total frequency of 1 has no sample form. Every value in a class is assumed to sit at its midpoint, so the result is an estimate. Frequencies are counts of observations, so they must be whole numbers and not negative; a fractional or negative frequency, lists of different lengths, or a total frequency of zero show no result. Midpoints may be negative or decimal.

Worked example

Classes 0–10, 10–20, 20–30, 30–40, 40–50 have midpoints 5, 15, 25, 35, 45 and frequencies 4, 10, 18, 12, 6, so N = 50. Σ f·m = 20 + 150 + 450 + 420 + 270 = 1310, and the mean is 1310 ÷ 50 = 26.20. The weighted squared deviations are 4×449.44 + 10×125.44 + 18×1.44 + 12×77.44 + 6×353.44 = 6128. Sample variance, OpenStax's grouped-table formula: 6128 ÷ (50 − 1) = 125.06, so s = √125.06 = 11.18. Treated as a whole population instead: 6128 ÷ 50 = 122.56 and σ = √122.56 = 11.07.

Try this example →

Common mistakes

  • Entering the class limits (0–10) or the class width instead of the midpoints. The midpoint of 0–10 is 5, and there must be one midpoint per class.
  • Giving lists of different lengths, such as 5 midpoints and 4 frequencies. Each midpoint needs exactly one frequency, or there is no result.
  • Entering relative frequencies such as 0.1, 0.2, 0.4 or percentages with decimals. Frequencies must be whole counts, so fractional values show no result; use the original counts from the table.
  • Reading the wrong line. The main figure divides by n − 1, for a table drawn from a larger population; if the table covers the whole population, use σ, which divides by N.
  • Typing a decimal comma. Commas separate numbers in these lists, so 12,5 is read as 12 and 5; write 12.5.

Sources

About this calculator

Grouped data arrives already sorted into class intervals with a count (frequency) for each one, rather than as a list of raw individual values — a typical example is a frequency table showing how many people fall into each age bracket. Since the exact individual values inside each class are unknown, the midpoint of each class interval stands in as the best estimate for every value in that class, and the sample standard deviation and variance (dividing by n − 1, as OpenStax's grouped-table formula does) are then computed using those midpoints weighted by their frequencies, with the population form (dividing by N) beside them.

This calculation is standard in introductory statistics courses precisely because so much real-world data — census age brackets, income ranges, exam score bands, histogram bins — comes pre-grouped rather than as raw individual measurements, so students and analysts need a method for estimating spread from summarized frequency-table data rather than from a full data set.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators