Page 287 - Ai_V3.0_c11_flipbook
P. 287

MEAN (Frequency Distribution Series)          Direct Method


                                                                            1.  Find mid values m= (l + l )/2
                                Wages         m=          f        fm                              1  2
                                  (x)      (l  + l )/2                      2.  Find fm
                                             1
                                                 2
                                 0 – 100       50        2          100     3.  Find ∑ fm and ∑ f

                              100 – 200       150        1          150     4.  Apply formula
                              200 – 300       250        3          750               X =  ∑  fm

                              300 – 400       350        3         1050                   ∑  f

                              400 – 500       450        1          450                 2500
                                                                                      =
                                                       ∑f =10  ∑fm= 2500                 10

                                                                                      =  250







                 Mean Calculation using Python
                 Program 1: To calculate the mean weight of 25 students.
                 50.5, 55.2, 60.3, 65.8, 70.1, 75.6, 80.4, 85.7, 90.2, 95.5, 50.3, 55.8, 60.1, 65.4, 70.9, 75.2, 80.6, 85.3, 90.8, 95.1,
                 50.7, 55.9, 60.5, 65.2, 70.4


                 import statistics
                 # List of weights for 25 students

                 weights = [50.5, 55.2, 60.3, 65.8, 70.1, 75.6, 80.4, 85.7, 90.2, 95.5,
                            50.3, 55.8, 60.1, 65.4, 70.9, 75.2, 80.6, 85.3, 90.8, 95.1,
                            50.7, 55.9, 60.5, 65.2, 70.4]


                 # Calculate the mean weight using statistics.mean()
                 mean_weight = statistics.mean(weights)



                 # Print the mean weight
                 print("Mean weight of 25 students is:", mean_weight)
                 Output:

                 Mean weight of 25 students is: 70.46

                 Median
                 The median is a measure of central tendency that represents the middle value in a dataset when the values are
                 arranged in ascending or descending order. It divides the dataset into two equal halves, with half of the values being
                 less than the median and half being greater.



                                                                   Data Literacy—Data Collection to Data Analysis  285
   282   283   284   285   286   287   288   289   290   291   292