Calculating Standard Deviation Step by Step
Calculating Standard Deviation Step by Step
Examples
Published on June 7, 2022 by Shaun Turney. Revised on June 21, 2023.
A frequency distribution describes the number of observations for each possible value
of a variable. Frequency distributions are depicted using graphs and frequency tables.
Example: Frequency distributionIn the 2022 Winter Olympics, Team USA won 25 medals. This
frequency table gives the medals’ values (gold, silver, and bronze) and frequencies:
Table of contents
1.
2.
3.
4.
5.
The method for making a frequency table differs between the four types of frequency
distributions. You can follow the guides below or use software such as Excel, SPSS, or
R to make a frequency table.
1. Create a table with two columns and as many rows as there are values of the
variable. Label the first column using the variable name and label the second
column “Frequency.” Enter the values in the first column.
o For ordinal variables, the values should be ordered from smallest to
largest in the table rows.
o For nominal variables, the values can be in any order in the table. You
may wish to order them alphabetically or in some other logical order.
2. Count the frequencies. The frequencies are the number of times each value
occurs. Enter the frequencies in the second column of the table beside their
corresponding values.
o Especially if your dataset is large, it may help to count the frequencies
by tallying. Add a third column called “Tally.” As you read the
observations, make a tick mark in the appropriate row of the tally column
for each observation. Count the tally marks to determine the frequency.
Example: Making an ungrouped frequency tableA gardener set up a bird feeder in their
backyard. To help them decide how much and what type of birdseed to buy, they decide to
record the bird species that visit their feeder. Over the course of one morning, the following birds
visit their feeder:
1. Divide the variable into class intervals. Below is one method to divide a
variable into class intervals. Different methods will give different answers, but
there’s no agreement on the best method to calculate class intervals.
o Calculate the range. Subtract the lowest value in the dataset from the
highest.
o Decide the class interval width. There are no firm rules on how to
choose the width, but the following formula is a rule of thumb:
You can round this value to a whole number or a number that’s convenient
to add (such as a multiple of 10).
2. Create a table with two columns and as many rows as there are class intervals.
Label the first column using the variable name and label the second column
“Frequency.” Enter the class intervals in the first column.
3. Count the frequencies. The frequencies are the number of observations in each
class interval. You can count by tallying if you find it helpful. Enter the
frequencies in the second column of the table beside their corresponding class
intervals.
The class intervals are 19 ≤ a < 29, 29 ≤ a < 39, 39 ≤ a < 49, 49 ≤ a < 59, and 59 ≤ a < 69.
How to make a relative frequency table
From this table, the sociologist can make observations such as 13 respondents (65%) were under
39 years old, and 16 respondents (80%) were under 49 years old.
Pie chart
A pie chart is a graph that shows the relative frequency distribution of a nominal
variable.
A pie chart is a circle that’s divided into one slice for each value. The size of the slices
shows their relative frequency.
This type of graph can be a good choice when you want to emphasize that one variable
is especially frequent or infrequent, or you want to present the overall composition of a
variable.
A disadvantage of pie charts is that it’s difficult to see small differences between
frequencies. As a result, it’s also not a good option if you want to compare the
frequencies of different values.
Bar chart
A bar chart is a graph that shows the frequency or relative frequency distribution of
a categorical variable (nominal or ordinal).
The y-axis of the bars shows the frequencies or relative frequencies, and the x-axis
shows the values. Each value is represented by a bar, and the length or height of the
bar shows the frequency of the value.
A bar chart is a good choice when you want to compare the frequencies of different
values. It’s much easier to compare the heights of bars than the angles of pie chart
slices.
Histogram
A histogram is a graph that shows the frequency or relative frequency distribution of
a quantitative variable. It looks similar to a bar chart.
The continuous variable is grouped into interval classes, just like a grouped frequency
table. The y-axis of the bars shows the frequencies or relative frequencies, and the x-
axis shows the interval classes. Each interval class is represented by a bar, and the
height of the bar shows the frequency or relative frequency of the interval class.
Although bar charts and histograms are similar, there are important differences:
Bar spacing Can be a space between bars Never a space between bars
Bar order Can be in any order Can only be ordered from lowest to highest
Search
Variance of a population
Population standard deviation
The idea of spread and standard deviation
Calculating standard deviation step by step
Standard deviation of a population
Not started
Mean and standard deviation versus median and IQR
Concept check: Standard deviation
Statistics: Alternate variance formulas
Math>
Statistics and probability>
Summarizing quantitative data>
Variance and standard deviation of a population
© 2023 Khan Academy
Terms of usePrivacy PolicyCookie Notice
Search
Variance of a population
Population standard deviation
The idea of spread and standard deviation
Calculating standard deviation step by step
Standard deviation of a population
Not started
Mean and standard deviation versus median and IQR
Concept check: Standard deviation
Statistics: Alternate variance formulas
Math>
Statistics and probability>
Summarizing quantitative data>
Variance and standard deviation of a population
© 2023 Khan Academy
Terms of usePrivacy PolicyCookie Notice
So what's the point of this article? Why are we taking time to learn a
process statisticians don't actually use? The answer is that learning to
do the calculations by hand will give us insight into how standard
deviation really works. This insight is valuable. Instead of viewing
standard deviation as some magical number our spreadsheet or
computer program gives us, we'll be able to explain where that
number comes from.
The standard deviation formula may look confusing, but it will make
sense after we break it down. In the coming sections, we'll walk
through a step-by-step interactive example. Here's a quick preview of
the steps we're about to follow:
Step 2: For each data point, find the square of its distance to the
mean.
An important note
The formula above is for finding the standard deviation of a
population. If you're dealing with a sample, you'll want to use a slightly
different formula (below), which uses �−1n−1n, minus, 1 instead
of �NN. The point of this article, however, is to familiarize you with
the process of computing standard deviation, which is basically the
same no matter which formula you use.
SDsample=∑∣�−�ˉ∣2�−1SDsample=n−1∑∣x−xˉ∣2start text, S, D, end text,
start subscript, start text, s, a, m, p, l, e, end text, end subscript,
equals, square root of, start fraction, sum, start subscript, end
subscript, start superscript, end superscript, open vertical bar, x,
minus, x, with, \bar, on top, close vertical bar, squared, divided by, n,
minus, 1, end fraction, end square root
[Why are there two formulas?]
Onward!
�=μ=mu, equals
Check
[Hide explanation]
222
333
111
Check
[Hide explanation]
Check
[Hide explanation]
Add up all of the squared distances from the data points to the mean
from Step 2:
Check
[Hide explanation]
Divide the sum from Step 3 by the number of data points (�=4)
(N=4)left parenthesis, N, equals, 4, right parenthesis:
Check
[Hide explanation]
Step 2: Find the square of the distance from each data point to the
mean ∣�−�∣2∣x−μ∣2open vertical bar, x, minus, mu, close vertical bar,
squared.
Try it yourself
Here's a reminder of the formula:
We couldn't grade your answer. It looks like you left something blank or entered in an invalid answer.
Check
[Hide explanation]
The answer
The standard deviation is approximately 2.282.282, point, 28.