Theory:

Let us look at an example to find standard deviation of a grouped data by mean method.
Example:
Case 1: Discrete data
 
Find the standard deviation of the following data by mean method.
 
\(x\)
\(1\)
\(2\)
\(3\)
\(4\)
\(f\)
\(4\)
\(8\)
\(12\)
\(16\)
  
Explanation:
We know that the formula for finding the arithmetic mean using direct method is given by:
 
\(\overline x = \frac{\sum_{i = 1}^{n}  f_{i} x_{i}}{\sum_{i = 1}^{n} f_{i}}\)
 
Where \(x_{i}\) is the midpoint of the class interval and \(f_{i}\) is the frequency.
Let us form a frequency distribution table.
 
\(x_{i}\)
\(f_{i}\)
\(f_{i} x_{i}\)
\(1\)
\(4\)
\(4\)
\(2\)
\(8\)
\(16\)
\(3\)
\(12\)
\(36\)
\(4\)
\(16\)
\(64\)
  
\(\sum_{i = 1}^{4} f_{i} = 40\)
\(\sum_{i = 1}^{4}  f_{i} x_{i} = 120\)
 
Substituting the known values in the above formula, we get:
 
Mean \(\overline x = \frac{120}{40}\) \(=\) \(3\)
 
Thus, the meanof the given data is
 
Now, let us find the standard deviation for the given data.
 
\(x_{i}\)
\(f_{i}\)
\(d_{i} = x_{i} - \overline x\)
 
\(=\) \(x_{i} - 3\)
\(d_{i}^{2}\)
\(f_{i}d_{i}^{2}\)
\(1\)
\(4\)
\(-2\)
\(4\)
\(16\)
\(2\)
\(8\)
\(-1\)
\(1\)
\(8\)
\(3\)
\(12\)
\(0\)
\(0\)
\(0\)
\(4\)
\(16\)
\(1\)
\(1\)
\(16\)
 
\(\sum_{i = 1}^{4} f_{i} = 40\)
 
 
\(\sum_{i = 1}^{4}  f_{i} d_{i}^{2} = 40\)
The formula to calculate the standard deviation by mean method is given by:
 
\(\sigma\) \(=\) \(\sqrt{\frac{\sum f_{i} d_{i}^{2}}{N}}\) where \(N = \sum_{i = 1}^{n} f_{i}\)
Substitute the required values in the above formula.
 
\(\sigma\) \(=\) \(\sqrt{\frac{40}{40}}\)
 
\(=\) \(\sqrt{1}\)
 
\(=\) \(1\)
 
Therefore, the standard deviation of the given data is \(1\).
 
Case 2: Continuous data
 
Find the standard deviation of the following data by mean method.
 
\(x\)
\(0 - 2\)
\(2 - 4\)
\(4 - 6\)
\(6 - 8\)
\(f\)
\(4\)
\(8\)
\(12\)
\(16\)
 
Explanation:
We know that the formula for finding the arithmetic mean using direct method is given by:
 
\(\overline x = \frac{\sum_{i = 1}^{n}  f_{i} x_{i}}{\sum_{i = 1}^{n} f_{i}}\)
 
Where \(x_{i}\) is the midpoint of the class interval and \(f_{i}\) is the frequency.
Let us form a frequency distribution table.
 
Class interval
Frequency
(\(f_{i}\))
Midpoint
(\(x_{i}\))
\(f_{i} x_{i}\)
\(0 - 2\)
\(4\)
\(1\)
\(4\)
\(2 - 4\)
\(8\)
\(3\)
\(24\)
\(4 - 6\)
\(12\)
\(5\)
\(60\)
\(6 - 8\)
\(16\)
\(7\)
\(112\)
  
\(\sum_{i = 1}^{4} f_{i} = 40\)
 
\(\sum_{i = 1}^{4}  f_{i} x_{i} = 200\)
 
Substituting the known values in the above formula, we get:
 
Mean \(\overline x = \frac{200}{40}\) \(=\) \(5\)
 
Thus, the mean of the given data is \(5\)
 
Now, let us find the standard deviation for the given data.
 
\(x_{i}\)
\(f_{i}\)
\(d_{i} = x_{i} - \overline x\)
 
\(=\) \(x_{i} - 5\)
\(d_{i}^{2}\)
\(f_{i}d_{i}^{2}\)
\(1\)
\(4\)
\(-4\)
\(16\)
\(64\)
\(3\)
\(8\)
\(-2\)
\(4\)
\(32\)
\(5\)
(12\)
\(0\)
\(0\)
\(0\)
\(7\)
\(16\)
\(2\)
\(4\)
\(64\)
 
\(\sum_{i = 1}^{4} f_{i} = 40\)
 
 
\(\sum_{i = 1}^{4}  f_{i} d_{i}^{2} = 160\)
The formula to calculate the standard deviation by mean method is given by:
 
\(\sigma\) \(=\) \(\sqrt{\frac{\sum f_{i} d_{i}^{2}}{N}}\) where \(N = \sum_{i = 1}^{n} f_{i}\)
Substitute the required values in the above formula.
 
\(\sigma\) \(=\) \(\sqrt{\frac{160}{40}}\)
 
\(=\) \(\sqrt{4}\)
 
\(=\) \(2\)
 
Therefore, the standard deviation of the given data is \(2\).