Table of Contents
The Standard Deviation is a commonly used measure of variability or spread in a set of data in statistics. It measures how much the data values deviate from the mean, which is the average of all the values. A lower standard deviation indicates that the data points are closer to the mean, while a higher standard deviation indicates that the data points are more spread out. It is an important tool for understanding the distribution of data and identifying any outliers or unusual values. The standard deviation is calculated by taking the square root of the average of the squared differences between each data point and the mean. It is often used in conjunction with the mean to provide a more comprehensive understanding of a data set.
Statistics – Standard Deviation
Standard deviation is the most commonly used measure of variation, which describes how spread out the data is.
Standard Deviation
Standard deviation (σ) measures how far a ‘typical’ observation is from the average of the data (μ).
Standard deviation is important for many statistical methods.
Here is a histogram of the age of all 934 Nobel Prize winners up to the year 2020, showing standard deviations:
Each dotted line in the histogram shows a shift of one extra standard deviation.
If the data is normally distributed:
- Roughly 68.3% of the data is within 1 standard deviation of the average (from μ-1σ to μ+1σ)
- Roughly 95.5% of the data is within 2 standard deviations of the average (from μ-2σ to μ+2σ)
- Roughly 99.7% of the data is within 3 standard deviations of the average (from μ-3σ to μ+3σ)
Note: A normal distribution has a “bell” shape and spreads out equally on both sides.
Calculating the Standard Deviation
You can calculate the standard deviation for both the population and the sample.
The formulas are almost the same and uses different symbols to refer to the standard deviation ((sigma)) and sample standard deviation ((s)).
Calculating the standard deviation ((sigma)) is done with this formula:
(displaystyle sigma = sqrt{frac{sum (x_{i}-mu)^2}{n}})
Calculating the sample standard deviation ((s)) is done with this formula:
(displaystyle s = sqrt{frac{sum (x_{i}-bar{x})^2}{n-1}})
(n) is the total number of observations.
(sum ) is the symbol for adding together a list of numbers.
(x_{i}) is the list of values in the data: (x_{1}, x_{2}, x_{3}, ldots )
(mu) is the population mean and (bar{x}) is the sample mean (average value).
( (x_{i} – mu ) ) and ( (x_{i} – bar{x} ) ) are the differences between the values of the observations ((x_{i})) and the mean.
Each difference is squared and added together.
Then the sum is divided by (n) or (( n – 1 )) and then we find the square root.
Using these 4 example values for calculating the population standard deviation:
4, 11, 7, 14
We must first find the mean:
(displaystyle mu = frac{sum x_{i}}{n} = frac{4 + 11 + 7 + 14}{4} = frac{36}{4} = underline{9} )
Then we find the difference between each value and the mean ( (x_{i}- mu)):
- ( 4-9 ; := -5 )
- ( 11-9 = 2 )
- ( 7-9 ; := -2 )
- ( 14-9 = 5 )
Each value is then squared, or multiplied with itself ( ( x_{i}- mu )^2):
- ( (-5)^2 = (-5)(-5) = 25 )
- ( 2^2 ; ; ; ; ; , = 2*2 ; ; ; ; ; ; ; : = 4 )
- ( (-2)^2 = (-2)(-2) = 4 )
- ( 5^2 ; ; ; ; ; , = 5*5 ; ; ; ; ; ; ; : = 25 )
All of the squared differences are then added together ( sum (x_{i} -mu )^2):
( 25 + 4 + 4 + 25 = 58)
Then the sum is divided by the total number of observations, ( n ):
( displaystyle frac{58}{4} = 14.5)
Finally, we take the square root of this number:
( sqrt{14.5} approx underline{3.81} )
So, the standard deviation of the example values is roughly: (3.81 )
Calculating the Standard Deviation with Programming
The standard deviation can easily be calculated with many programming languages.
Using software and programming to calculate statistics is more common for bigger sets of data, as calculating by hand becomes difficult.
Population Standard Deviation
Example
With Python use the NumPy library std() method to find the standard deviation of the values 4,11,7,14:
import numpy values = [4,11,7,14]
x = numpy.std(values)
print(x)
Example
Use an R formula to find the standard deviation of the values 4,11,7,14:
values <- c(4,7,11,14) sqrt(mean((values-mean(values))^2))
Sample Standard Deviation
Example
With Python use the NumPy library std() method to find the sample standard deviation of the values 4,11,7,14:
import numpy values = [4,11,7,14]
x = numpy.std(values, ddof=1)
print(x)
Example
Use the R sd() function to find the sample standard deviation of the values 4,11,7,14:
values <- c(4,7,11,14) sd(values)
Statistics Symbol Reference
| Symbol | Description |
|---|---|
| ( sigma ) | Population standard deviation. Pronounced ‘sigma’. |
| ( s ) | Sample standard deviation. |
| ( mu ) | The population mean. Pronounced ‘mu’. |
| ( bar{x} ) | The sample mean. Pronounced ‘x-bar’. |
| ( sum ) | The summation operator, ‘capital sigma’. |
| ( x ) | The variable ‘x’ we are calculating the average for. |
| ( i ) | The index ‘i’ of the variable ‘x’. This identifies each observation for a variable. |
| ( n ) | The number of observations. |
Cite this article
stats writer (2024). What is the Standard Deviation in Statistics?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/what-is-the-standard-deviation-in-statistics/
stats writer. "What is the Standard Deviation in Statistics?." PSYCHOLOGICAL SCALES, 29 Jun. 2024, https://scales.arabpsychology.com/stats/what-is-the-standard-deviation-in-statistics/.
stats writer. "What is the Standard Deviation in Statistics?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/what-is-the-standard-deviation-in-statistics/.
stats writer (2024) 'What is the Standard Deviation in Statistics?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/what-is-the-standard-deviation-in-statistics/.
[1] stats writer, "What is the Standard Deviation in Statistics?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. What is the Standard Deviation in Statistics?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
