Skip to content
Related Articles
Open in App
Not now

Related Articles

Standard Deviation Formula

Improve Article
Save Article
  • Last Updated : 10 Jul, 2022
Improve Article
Save Article

In statistics, the measure of the variation of values is known as Standard Deviation (SD). A low value of SD implies that the given set of values is spread over a small range, whereas a large value of SD means that the set of values is spread out over a large range. SD is often represented by the greek alphabet sigma σ  for population standard deviation or by the letter s for sample standard deviation. Now we shall see what is the difference between population and sample and the difference between their standard deviations. The population is defined as the entire group you want to study on. For Example All football players in Liverpool FC, All countries in the world, and all smartphones in the world. A sample is defined as a subgroup of a population under a specific condition. For Example All forward players in Liverpool FC, All countries that have an existent monarchy, All smartphones made by Apple

Population Vs Sample

 

Note: The sample size is usually less than the population size but in some rare cases it can be the same. Now that we know the difference between population and sample let’s look at their standard deviations.

Population Standard Deviation formula

σ =  \sqrt{\frac{\sum_{i=1}^N (x_i - \mu)^2}{N}}

Here σ = Population Standard Deviation

xi = ith observation

μ = mean of N observation

N = number of observations.

If xi has different probabilities we use the formula,

σ =\sqrt{\sum_{i=1}^N p_i\times(x_i - \mu)^2}

Where pi = probability of x

The above formulas are used when the value of x is finite. If we are given a continuous range of x we use the following,

E(x) = \int_{-\infin}^{\infin}x\times p(x)dx\\ E(x^2) =  \int_{-\infin}^{\infin}x^2\times p(x)dx\\ σ = \sqrt{E(x^2)-(E(x))^2}

Here p(x) = Probability density function

E(x) = mean or expected value

Sample Standard Deviation

The formula for sample SD is very similar to the population SD with minor changes,

s = \sqrt{\frac{\sum_{i=1}^N (x_i - \bar x)^2}{N-1}}

Here \bar x = mean of the sample

N = number of sample

Where does the N-1 come from?

The values in the sample will naturally be closer to the sample mean \bar x than to the population mean μ. Thus to compensate for this, so that the SD is not underestimated, we use N – 1 instead of N in the denominator. If one wants to further read on it, feel free to google Unbiased estimation of standard deviation. It’ll give you the reason why we use N – 1 and not N – 2, etc.

Standard Deviation of Grouped Data

Now we shall see what to do if you’ve been given grouped data along with their frequency of occurrence. In Discrete Frequency Distribution, One value of X corresponds to one frequency. It will become clear from the sample problems below,

Sample Problems

Problem 1: Find the Standard Deviation of X = {2, 2, 3, 4, 6, 7}. 

Solution:

N = 6

x = {2, 2, 3, 4, 6, 7}

μ = \frac{\sum_{i = 1}^{N}x_i}{N}

= (2 + 2 + 3 + 4 + 6 + 7)/ 6

= 4

\sum_{i = 1}^{N}(x_i-\mu)^2 = (2 – 4)2 + (2 – 4)2 + (3 – 4)2 + (4 – 4)2 + (6 – 4)2 + (7 – 4)2

= 22

\sigma = \sqrt {\frac{\sum_{i=1}^{N}(x_i-\mu)^2 }{N}}

σ = √(22/6)

= 1.914

Problem 2: Find the Standard deviation of X = {0, 1, 2, 3, 4} where the probability of each value is given by p(x) = {0.1, 0.3, 0.1, 0.2, 0.3}.

Solution:

X

p(X)

(A)

X × p(X)

 

(Xi – μ)2

(B)

A×B

0

0.1

0

5.29

0.529

1

0.3

0.3

1.69

0.507

2

0.1

0.2

0.09

0.009

3

0.2

0.6

0.49

0.098

4

0.3

1.2

2.89

0.867

Total

 

2.3

 

2.01

μ = ∑ p(x) × x

= 2.3

\sigma = \sqrt{\sum(x_i-\mu)^2×p(x_i)} = \sqrt{2.01} = 1.417

Problem 3: Find the standard deviation of X if the pdf of X is given by the function p(x) = (1 – x) for x ∈ [0, 1].

Solution:

p(x) = 1-x\\ x\in[0,1]\\ E(x) = \int_{-\infin}^{\infin}x× p(x) = \int_{0}^{1}x×(1-x)dx = [\frac{x^2}{2}-\frac{x^3}{3}]_{0}^{1} = \frac{1}{6}\\ E(x^2) = \int_{-\infin}^{\infin}x^2×p(x) = \int_{0}^{1}x^2×(1-x)dx = [\frac{x^3}{3}-\frac{x^4}{4}]_{0}^{1} = \frac{1}{12}\\ \sigma = \sqrt{E(x^2) - (E(x))^2}\\ \sigma = \sqrt{\frac{1}{12}-\frac{1}{36}}\\ \sigma = \sqrt{0.055} \approx 0.24

Problem 4: There were 30 students in the class. The weight of 5 is given as follows – 50Kg,35Kg, 80Kg, 45Kg, and 55Kg. Find the sample standard deviation.

Solution:

N = 5\\ \bar x = \frac{50+35+80+45+55}{5} = 53\\ s = \sqrt{\frac{\sum_{i=1}^N (x_i - \bar x)^2}{N-1}}\\ s = \sqrt{\frac{(50-53)^2 + (35-53)^2 + (80-53)^2 + (45-53)^2 + (55-53)^2}{5-1}}\\ s = \sqrt{\frac{1130}{4}} = 16.8

Problem 5: Find the sample SD of the following data – {5, 6, 10, 12, 13}

Solution:

N = 5\\ \bar x = \frac{5+6+10+12+13}{5} = 9.2\\ s = \sqrt{\frac{\sum_{i=1}^N(x_i-\bar x)^2}{N-1}}\\ s = \sqrt{\frac{(5-9.2)^2+(6-9.2)^2+(10-9.2)^2+(12-9.2)^2+(13-9.2)^2}{5-1}}\\ s = \sqrt{\frac{50.8}{4}} = 3.56

Problem 6: Find the Standard Deviation of the following data,

Xi

fi

5

2

12

4

15

3

Solution:

Xi fi Xi×fi Xi (Xi-μ)2 f×(Xi-μ)2
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

\mu = \frac{\sum{f×x}}{\sum{f}} = \frac{91}{8} = 11.375

\sigma = \sqrt\frac{\sum_{i = 0}^N{f_i×(x_i-\mu)^2}}{\sum_{i = 0}^N{f_i}}\\ \sigma = \sqrt\frac{121.87}{8}\\ \sigma = \sqrt{15.234} \approx 3.90

Problem 7: Find the Standard Deviation of the following data table

Class f
0-10 3
10-20 6
20-30 4
30-40 2
40-50 1

Solution:

Class

Mid point 

Xi

f

f×Xi

Xi – μ

(Xi – μ)2

f×(Xi – μ)2

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

\mu = \frac{\sum{f×x}}{\sum{f}} = \frac{320}{16} = 20

\sigma = \sqrt\frac{\sum_{i = 0}^N{f_i×(x_i-\mu)^2}}{\sum_{i = 0}^N{f_i}}\\ \sigma = \sqrt\frac{2000}{16}\\ \sigma = \sqrt{125} \approx 11.18


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!