We know that the formula for Standard Deviation is:  
       S = √∑(x – x’)2
                    N
In the given standard deviation formula‘s’ is the standard deviation,
 x is value in the data Set;
 x’ is the Mean of the values;
‘N’ is the number of the values.
Now we can Calculate the standard deviation step by step:
For finding the standard deviation it is necessary to find the mean to the given data.
The formula for the finding the mean is:
      X = ∑x,
               N
Here in this above formula we can also solve the value of sigma or we can say the sum of all the given data.
= x1+ x2+ x3 + x4 …. + xN,
                     N       
5 + 9 + 8 + 3 + 7 + 1 + 2;
                  7
 On further solving we get:
 = 35
     7
 = 5;
So the mean value is 5;
Now we calculate x – x’ from the given data:
X1 – x = 5 – 5 = 0;
X2 – x = 9 – 5 = 4;
X3 – x = 8 – 5 = 3; 
X4 – x = 3 – 5 = -2;
X5 – x = 7 – 5 = 2;
X6 – x = 1 – 5 = -4;
X7 – x = 2 – 5 = -3;
Now we have to calculate ∑(X – x’)2;
∑(X – x’)2 = (X1 – x’)2 + (X2 – x’)2 +… (Xn – x’)2,
                                           
 = (0)2 + (4)2 + (3)2 + (-2)2 + (2)2 + (-4)2 + (-3)2;
= 0 + 16 + 9 + 4 + 4 + 16 + 9 = 58;
 Now put all the values in the standard deviation formula:
   S = √∑(x – x)2,
               N 
      = √ 58,
              7
      = √58,
            7
On further solving we get:
    = √8.2
On further solving the value we get:        
         = 2.86
So the value of standard deviation is 2.86.