Page 265 - Artificial Intellegence_v2.0_Class_11
P. 265

Variance and Standard Deviation

                 Variance is defined as the sum of the squares of the deviation from the mean. It determines how far away from the mean
                 each data point is in a collection.
                 The square root of the variance is the standard deviation.
                 Example:

                 Calculate variance and standard deviation of the following data:
                 2,6,5,7,14,15,17,12,8,16

                 Step 1:   Calculate the mean (average)

                          Mean = (2 + 6 + 5 + 7 + 14 + 15 + 17 + 12 + 8 + 16) / 10

                          Mean = 102 / 10
                          Mean = 10.2

                 Step 2:   Subtract the mean from each value and square the result:
                                  2
                                         2
                          (2 - 10.2)  = (-8.2)  = 67.24
                          (6 - 10.2)  = (-4.2)  = 17.64
                                         2
                                  2
                                         2
                                  2
                          (5 - 10.2)  = (-5.2)  = 27.04
                                  2
                                         2
                          (7 - 10.2)  = (-3.2)  = 10.24
                                          2
                                   2
                          (14 - 10.2)  = (3.8)  = 14.44
                                          2
                                   2
                          (15 - 10.2)  = (4.8)  = 23.04
                                   2
                                          2
                          (17 - 10.2)  = (6.8)  = 46.24
                                          2
                                   2
                          (12 - 10.2)  = (1.8)  = 3.24
                                         2
                                  2
                          (8 - 10.2)  = (-2.2)  = 4.84
                                          2
                                   2
                          (16 - 10.2)  = (5.8)  = 33.64
                 Step 3:   Find the sum of the squared differences:
                          Sum = 67.24 + 17.64 + 27.04 + 10.24 + 14.44 + 23.04 + 46.24 + 3.24 + 4.84 + 33.64
                          Sum = 247.6
                 Step 4:   Divide the sum from Step 3 by the number of values to get the variance:

                          Variance = Sum / Number of values
                          Variance = 247.6/ 10
                          Variance = 24.76

                 Step 5:   Take the square root of the variance to get the standard deviation:

                          Standard Deviation =  24.76
                          Standard Deviation = 4.9 = 5 (Approx.)

                 So, the variance of the given values is 24.76, and the standard deviation is approximately 5.





                                                                        Data Analysis (Computational Thinking)  263
   260   261   262   263   264   265   266   267   268   269   270