keisoku

Mean & Standard Deviation from a Frequency Distribution

Just enter your class midpoints and frequencies to instantly get the mean (weighted average), variance, and standard deviation of a frequency distribution table. See both population and sample values, plus a full x×f breakdown.

Input

Enter one "class midpoint, frequency" pair per line. Separate them with a space, comma, or tab (e.g. 30, 8).

Result

Mean (weighted average)

28.5

Standard deviation (population)

10.14

Variance (population)

102.75

Total frequency

20

Sample standard deviation

10.4

Sample variance

108.16


Calculation breakdown

Midpoint xFrequency fx × ff(x − mean)²
10220684.5
205100361.25
30824018
404160529
50150462.25
Total205702,055

How it works

  • Enter one "class midpoint, frequency" pair per line. You can separate the values with a space, comma, or tab, and any line that does not contain two numbers is ignored automatically.
  • The mean (weighted average) is Σ(class midpoint × frequency) ÷ Σ(frequency). Each class midpoint is weighted by its frequency before summing.
  • The variance is Σ{frequency × (class midpoint − mean)²} divided by the total frequency (the population variance, also called the sample variance in statistics). The standard deviation is the square root of that variance.
  • The unbiased variance and standard deviation divide by the total frequency minus one (n−1). Use these when you treat your data as a sample used to estimate the whole population. They cannot be computed when the total frequency is 1.
  • The class midpoint is usually the center of each class (for example, 15 for a class of 10 up to 20). Because results depend on how classes are defined, the mean and standard deviation are approximations.
  • Results are shown to roughly two decimal places. The breakdown table lets you check each x×f and f(x−mean)² row along with the totals.