Standard deviation is the measure of the dispersion of statistical data. Standard deviation formula is used to find the deviation of the data value from the mean value i.e. it is used to find the dispersion of all the values in a data set with respect to the mean value. There are different standard deviation formulas to calculate the standard deviation of a random variable.
Standard deviation is a measure used in descriptive statistics to understand how the data points in a set are spread out from the average (mean) value. It indicates the extent of the data’s variation and shows how far individual data points deviate from the average
In this article, we will learn about what is standard deviation, the standard deviation formula, how to calculate standard deviation, and their examples in detail.
Table of Content
What is Standard Deviation?
Standard Deviation is defined as the degree of dispersion of the data point with respect to the mean value of the data point. It tells us how the value of the data points varies with respect to the mean value of the data point and it tells us about the variation of the data point in the sample of the data.
The standard deviation of the given sample of the data set is also defined as the square root of the variance of the data set. The mean deviation of the n values (say x1, x2, x3, …, xn) is calculated by taking the sum of the squares of the difference of each value from the mean, i.e.
Mean Deviation = 1/n∑in (xi – x̄)2

The mean deviation is used to tell us about the scatter of the data. The lower degree of deviation tells us that the observations xi are close to the mean value and the depression is low, whereas the higher degree of deviation tells us that the observations xi are far from the mean value and the dispersion is high.
Related Resources,
Standard deviation is used to measure the spread of the statistical data. It tells us about how the statistical data is spread out. Formula to Calculate Standard Deviation is used to find the deviation of all the data set from its mean position. You may have questions that standard deviation how to calculate or how to calculate a standard deviation. There are two standard deviation formulas that are used to find the Standard Deviation of any given data set. They are,
- Population Standard Deviation Formula
- Sample Standard Deviation Formula
The formula for the standard deviation of sample data is,

Notations for Standard Deviation,
- s = Population Standard Deviation,
- xi = ith observation,
- x̄ = Sample Mean, and
- N = number of observations.
Standard deviation Formula of population data is,

Where,
- σ = Population Standard Deviation,
- xi = ith observation,
- μ = Population mean, and
- N = number of observations.
It is evident to note that both formulas look the same and have only slide changes in their denominator. The denominator in the case of the sample is n-1 but in the case of the population is N. Initially the denominator in the sample standard deviation formula has “n” in its denominator but the result from this formula was not appropriate. So a correction was made and the n is replaced with n-1 this correction is called Bessel’s correction which in turn produced the most appropriate results.
Read More: Difference Between Variance and Standard Deviation
Formula for Calculating Standard Deviation
The formula used for calculating the Standard Deviation is discussed in the image below,

How to Calculate Standard Deviation?
Generally, when we talk about standard deviation we talk about population standard deviation. The steps to calculate the standard deviation of a given set of values is,
Step 1: Calculate the mean of the observation using the formula (Mean = Sum of Observations/Number of Observations)
Step 2: Calculate the squared differences of the data values from the mean. (Data Value – Mean)2
Step 3: Calculate the average of the squared differences. (Variance = Sum of Squared Differences / Number of Observations)
Step 4: Calculate the square root of variance this gives the Standard Deviation. (Standard Deviation = √Variance)
Standard Deviation of Ungrouped Data
For ungrouped data, the standard deviation can be calculated using three methods that are,
- Actual Mean Method
- Assumed Mean Method
- Step Deviation Method
Standard Deviation by Actual Mean Method
Standard Deviation by actual mean method uses the basic mean formula to calculate the mean of the given data and using this mean value we find out the standard deviation of the given data values. We calculate the mean in this method with the formula,
μ = (Sum of Observations)/(Number of Observations)
and then the standard deviation is calculated using the standard deviation formula.
σ = √(∑in (xi – x̄)2/n)
Example: Find the Standard Deviation of the data set. X = {2, 3, 4, 5, 6}
Solution:
Given: n = 5, and observations xi = {2, 3, 4, 5, 6}
We know,
Mean(μ) = (Sum of Observations)/(Number of Observations)
⇒ μ = (2 + 3 + 4 + 5 + 6)/ 5
⇒ μ = 4
σ2 = ∑in (xi – x̄)2/n
⇒ σ2 = 1/n[(2 – 4)2 + (3 – 4)2 + (4 – 4)2 + (5 – 4)2 + (6 – 4)2]
⇒ σ2 = 10/5 = 2
Thus, σ = √(2) = 1.414
Standard Deviation by Assumed Mean Method
For very large values of x finding the mean of the grouped data is a tedious task and so we assumed an arbitrary value (A) as the mean value and then calculate the standard deviation using the normal method. Suppose for the group of n data values ( x1, x2, x3, …, xn), the assumed mean is A then the deviation is,
di = xi – A
Now, the assumed mean formula is,
σ = √(∑in (di)2/n)
Standard Deviation by Step Deviation Method
We can also calculate the standard deviation of the grouped data using the step deviation method. As in the above method in this method also, we choose some arbitrary data value as the assumed mean (say A). Then we calculate the deviations of all data values (x1, x2, x3, …, xn), di = xi – A
In the next step, we calculate the Step Deviations (d’) using
d’ = d/i
where ‘i‘ is a common factor of all ‘d’ values
Then, the standard deviation formula is,
σ = √[(∑(d’)2 /n) – (∑d’/n)2] × i
where ‘n‘ is the total number of data values.
Standard Deviation of Discrete Grouped Data
In grouped data first, we made a frequency table and then any further calculation is made. For discrete grouped data, the standard deviation can also be calculated using three methods that are,
- Actual Mean Method
- Assumed Mean Method
- Step Deviation Method
Standard Deviation Formula Based on Discrete Frequency Distribution
For a given data set if it has n values (x1, x2, x3, …, xn) and the frequency corresponding to them is (f1, f2, f3, …, fn) then its standard deviation is calculated using the formula,
σ = √(∑in fi(xi – x̄)2/n)
Where,
- n is the total frequency (n = f1 + f2 + f3 +…+ fn ), and
- x̄ is the mean of data
Example: Calculate the standard deviation for the given data
Solution:
Mean (x̄) = ∑(fi xi)/∑(fi)
⇒ Mean (μ) = (10×1 + 4×3 + 6×5 + 8×1)/(1+3+5+1)
⇒ Mean (μ) = 60/10 = 6
n = ∑(fi) = 1+3+5+1 = 10
|
10
|
1
|
10
|
4
|
16
|
16
|
|
4
|
3
|
12
|
-2
|
4
|
12
|
|
6
|
5
|
30
|
0
|
0
|
0
|
|
8
|
1
|
8
|
2
|
4
|
8
|
Now,
σ = √(∑in fi(xi – x̄)2/n)
⇒ σ = √[(16 + 12 + 0 +8)/10]
⇒ σ = ????.6 = 1.897
Standard Derivation(σ) = 1.897
Standard Deviation of Discrete Data by Assumed Mean Method
In grouped data also, if the values in the given data set are very large, then we assumed a random value (say A) as the mean of the data. Then the deviation of each value from the assumed mean is calculated as,
di = xi – A
Now the formula for standard deviation by the assumed mean method is,
σ = √[(∑(fidi)2 /n) – (∑fidi/n)2]
Where,
- ‘f‘ is the frequency of data value x,
- ‘n‘ is the total frequency [n = ∑(fi)].
Standard Deviation of Discrete Data by Step Deviation Method
We can also use the step deviation method to calculate the standard deviation of the discrete grouped data. As in the above method in this method also, we choose some arbitrary data value as the assumed mean (say A). Then we calculate the deviations of all data values (x1, x2, x3, …, xn), di = xi – A
In the next step, we calculate the Step Deviations (d’) using
d’ = d/i
where ‘i‘ is a common factor of all ‘d‘ values
Then, the standard deviation formula is,
σ = √[(∑(fd’)2 /n) – (∑fd’/n)2] × i
where ‘n‘ is the total number of data values.
Standard Deviation of Continuous Grouped Data
For the continuous grouped data we can easily calculate the standard deviation using the Discrete data formulas by replacing each class with its midpoint (as xi) and then normally calculating the formulas.
The midpoint of each class is calculated using the formula,
xi (Midpoint) = (Upper Bound + Lower Bound)/2
For example, calculate the standard deviation of the continuous grouped data as given in the table,
|
0-10
|
10-20
|
20-30
|
30-40
|
|
2
|
4
|
2
|
2
|
Actual Mean Method
- Assumed Mean Method
- Step Deviation Method
We can use any of the above methods to find the standard deviation. Here we find the standard deviation using the actual mean method.
Solution to the above question is,
|
5-15
|
15-25
|
25-35
|
35-45
|
|
10
|
20
|
30
|
40
|
|
2
|
4
|
2
|
2
|
Mean (x̄) = ∑(fi xi)/∑(fi)
⇒ Mean (μ) = (10×2 + 20×4 + 30×2 + 40×2)/(2+4+2+2)
⇒ Mean (μ) = 240/10 = 24
n = ∑(fi) = 2+4+2+2 = 10
|
10
|
2
|
20
|
14
|
196
|
392
|
|
20
|
4
|
80
|
-4
|
16
|
64
|
|
30
|
2
|
60
|
6
|
36
|
72
|
|
40
|
2
|
80
|
16
|
256
|
512
|
Now,
σ = √(∑in fi(xi – x̄)2/n)
⇒ σ = √[(392 + 64 + 72 +512)/10]
⇒ σ = √104 = 10.198
Standard Derivation(σ) = 10.198
Similarly, other methods can also be used to find the standard deviation of the continuous grouped data.
Standard Deviation of Probability Distribution
In probability of all the possible outcomes is generally equal and we take many trials to find the experimental probability of the given experiment.
- For a normal distribution, the mean expected mean is zero and the Standard Deviation is 1.
- For a binomial distribution, the standard deviation is given by the formula,
σ = √npq
Where,
- n is the number of trials,
- p is the probability of success of the trial, and
- q is the probability of failure of the trial (q = 1-p).
- For a Poisson distribution, the standard deviation is given by
σ = √λt
Where,
- λ is the average number of successes, and
- t is the given time interval.
Standard Deviation of Random Variables
Random variables are the numerical values that denote the possible outcome of the random experiment in the sample space. Calculating the standard deviation of the random variable tells us about the probability distribution of the random variable and the degree of the difference from the expected value.
We use X, Y, and Z as the function to represent the random variables. The probability of the random variable is denoted as P(X) and the expected value is denoted by the μ symbol.
Then the standard deviation of the probability distribution is given using the formula,
σ = √(∑ (xi – μ)2×P(X)/n)
Read More,
Example Question based on Standard Deviation Formula
Example 1: Find the Standard Deviation of the following data,
Solution:
First make the table as follows, so we can calculate the further values easily.
|
5
|
2
|
10
|
-6.375
|
40.64
|
81.28
|
|
12
|
3
|
36
|
0.625
|
0.39
|
1.17
|
|
15
|
3
|
45
|
3.625
|
13.14
|
39.42
|
|
Total
|
8
|
91
|
|
|
121.87
|
Mean (μ) = ∑(fi xi)/∑(fi)
⇒ Mean (μ) = 91/8 = 11.375
σ = √(∑in fi(xi – μ)2/n)
⇒ σ = √[(121.87)/(8)]
⇒ σ = √(15.234)
⇒ σ = 3.90
Standard Derivation(σ) = 3.90
Example 2: Find the Standard Deviation of the following data table
|
0-10
|
3
|
|
10-20
|
6
|
|
20-30
|
4
|
|
30-40
|
2
|
|
40-50
|
1
|
Solution:
|
0-10
|
5
|
3
|
15
|
-15
|
225
|
675
|
|
10-20
|
15
|
6
|
90
|
-5
|
25
|
150
|
|
20-30
|
25
|
4
|
100
|
5
|
25
|
100
|
|
30-40
|
35
|
2
|
70
|
15
|
225
|
450
|
|
40-50
|
45
|
1
|
45
|
25
|
625
|
625
|
|
Total
|
|
16
|
320
|
|
|
2000
|
Mean (μ) = ∑(fi xi)/∑(fi)
⇒ Mean (μ) = 320/16 = 20
σ = √(∑in fi(xi – μ)2/n)
⇒ σ = √[(2000)/(16)]
⇒ σ = √(125)
⇒ σ = 11.18
Standard Derivation(σ) = 11.18
For a comprehensive collection of maths formulas across different grade levels and concepts, keep following GeeksforGeeks.
FAQs on Standard Deviation
1. What is the Meaning of Standard Deviation?
Standard deviation defines the volatility in the values of the data with respect mean value of the given data set. It is defined as the square root of the square of the mean of deviation.
2. How Standard Deviation is calculated?
The standard deviation is calculated using the formula,
σ = 
Where,
- σ = Population Standard Deviation,
- xi = ith observation,
- μ = Population mean, and
- N = number of observations.
3. Why Standard Deviation is used?
Standard deviation is used for a variety of purposes some of its important uses are,
- It is used for finding the volatility in the values of the data with respect to the mean value.
- It is used to find the range of deviation of the data.
- It predicts the maximum volatility in the given value of the data set.
4. What Is the Difference Between Standard Deviation and Variance?
Variance is calculated by taking the average of the squared deviation from the mean, whereas standard deviation is the square root of the variance. The other difference between them is in their unit. Standard deviation is expressed in the same units as the original values while Variance is expressed in unit2.
5. How is Standard Deviation for ungrouped data is found?
Standard Deviation for ungrouped is found using three methods,
- Actual Mean Method
- Assumed Mean Method
- Step Deviation Method
6. Can Standard Deviation be Negative?
No, standard deviation can never be negative as we can see in the formula all the terms which can be negative are squared.
7. Give a Standard Deviation Example.
Let’s say we have 1,3,4,5. Mean of the data is 13/4 = 3.25. The Standard Deviation = Root of [(3.25-1)2 + (3-3.25)2+ (4-3.25)2 + (5-3.25)2]/4 = Root of 2.06 = 1.43
8. What is the formula for standard deviation?
Mathematically, the formula can be written as:
Standard Deviation (σ) = √[ Σ(x – μ) 2/ N ]
Where:
σ is the standard deviation
Σ represents the summation symbol (adding up all the terms)
x is each individual data point
μ is the mean of the dataset
N is the total number of data points
Last Updated :
01 Sep, 2023
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...