standarddeviationcalculator.net

Updated Free · runs in your browser

Statistics

Frequency table standard deviation calculator

Enter each distinct value and the number of times it occurs. The calculator gives the standard deviation of all the observations the table stands for — sample or population — with the mean, the variance and a full working table.

Value (x)Frequency (f)Remove

One row per distinct value, with how many times it occurs. For class intervals such as 10–19, use the grouped-data calculator instead.

Treat the data as

The formulas

With values x, frequencies f and total frequency n = Σf:

x̄ = Σfx ÷ Σf s² = Σf(x − x̄)² ÷ (n − 1) (sample) σ² = Σf(x − x̄)² ÷ n (population)

The standard deviation is the square root of the variance. Each squared deviation is counted f times, exactly as if the value had been written out f times, so the result is identical to the standard deviation of the raw list.

The shortcut formula

Textbooks often compute the sum of squares without the mean, from Σfx and Σfx²:

Σf(x − x̄)² = Σfx² − (Σfx)² ÷ n

It is quicker by hand because it needs only three column totals. On a computer it can lose precision when the values are large and close together, so the calculator uses the deviation form and reports Σfx² only as a check.

A worked example

Forty customers rate a service from 1 to 5. The counts are the calculator's default rows:

Rating (x)ffxfx²f(x − x̄)²
144416.4025
2918369.455625
314421260.00875
48321287.605
552512519.503125
Σ4012141952.975
  1. Mean: x̄ = 121 ÷ 40 = 3.025.
  2. Sum of squares: Σf(x − x̄)² = 52.975. The shortcut agrees: 419 − 121² ÷ 40 = 419 − 366.025 = 52.975.
  3. Sample variance: 52.975 ÷ 39 = 1.35833, so s = 1.16548.
  4. Population variance: 52.975 ÷ 40 = 1.32438, so σ = 1.15081.

Note that n is 40, the total frequency — not 5, the number of rows. The standard error of the mean is 1.16548 ÷ √40 = 0.184278.

Frequency table or grouped data?

Frequency tableGrouped frequency table
Rows areExact values (1, 2, 3…)Class intervals (10–19, 20–29…)
x in the formulaThe value itselfThe class midpoint
ResultExactAn estimate
Typical dataRatings, dice rolls, family size, defects per unitHeights, incomes, test scores in bands
CalculatorThis pageGrouped data SD

If you have the raw list instead, you can also paste it into the standard deviation calculator using the 10:3 shorthand — value 10, three times — which is often quicker than filling a table.

Common mistakes

  • Using the number of rows as n. n is Σf.
  • Forgetting to multiply the squared deviations by f. Each row's deviation must be counted as many times as the value occurs.
  • Mixing up the columns. Swapping values and frequencies gives a plausible-looking but wrong answer. Frequencies must be whole numbers; this calculator rejects anything else.
  • Sample or population. A survey of 40 customers is a sample of all customers, so s (n − 1) is usually the right choice. Use σ only when the table covers everyone you care about.

Common questions

How do you find the standard deviation of a frequency table?

Multiply each value by its frequency and divide the total by Σf to get the mean. Then multiply each squared deviation from the mean by its frequency, add them up, divide by n − 1 for a sample (or n for a population), and take the square root: s = √(Σf(x − x̄)² ÷ (Σf − 1)).

Is n the number of rows or the total frequency?

The total frequency, Σf. A table with 5 rows whose frequencies add up to 40 describes 40 observations, so n = 40 and a sample divides by 39. Using the number of rows is the most common mistake with frequency tables.

What is the difference between a frequency table and grouped data?

A frequency table lists exact values — 1, 2, 3 — with how often each occurs, so the standard deviation is exact. Grouped data lists class intervals such as 10–19, and every observation in a class has to be treated as sitting at its midpoint, so the result is an estimate. For intervals, use the grouped data calculator.

Can I type a frequency table into the main standard deviation calculator?

Yes. Write each value as value:count, so 3:14 means fourteen 3s. The standard deviation calculator expands them and gives the same answer as this table.

How do I do this on a TI-84 or in Excel?

On a TI-84, put values in L1 and frequencies in L2, then run 1-Var Stats L1, L2; Sx is the sample SD. In Excel, with values in A and frequencies in B, the sample SD is =SQRT(SUMPRODUCT(B2:B6,(A2:A6-SUMPRODUCT(A2:A6,B2:B6)/SUM(B2:B6))^2)/(SUM(B2:B6)-1)).