Page 185 - Data Science class 10
P. 185

4.5. QUARTILES

            Quartiles are a type of percentile. They are a set of descriptive statistics. They summarise the central tendency and
            variability of a dataset or distribution.
                                                               th
               • The first quartile (Q1, or the lowest quartile) is the 25  percentile, which means that 25% of the data falls below
              the first quartile.
               • The second quartile (Q2, or the median) is the 50  percentile, which means that 50% of the data falls below
                                                             th
              the second quartile.
               • The third quartile (Q3, or the upper quartile) is the 75  percentile, which means that 75% of the data falls below
                                                               th
              the third quartile.




                        2      2       4       5      5       5      8       9      9       9      12






                                   First quartile        First quartile         First quartile
                                (Q1 or lower quartile)  (Q1 or lower quartile)  (Q1 or lower quartile)



            The first quartile is the median of all the values to the actual median's (Q2) left. Similarly, the third quartile is the
            median of all the values to the actual median's (Q2) right.


            4.5.1. Interquartile Range
            By using the values of the quartiles, we can also calculate the interquartile range. An interquartile range is defined
            as the measure of the middle 50% of the values when ordered from lowest to highest. The interquartile range can
            be determined by subtracting the first quartile (Q1) from the third quartile (Q3).

            IQR = Q3 – Q1
            Where:
            IQR = interquartile range

            Q1 = 1  quartile or 25th percentile
                  st
            Q3 = 3  quartile or 75th percentile
                  rd
            Let us take the following 10 data points:

            [20, 40, 60, 80, 100,120, 140, 160, 180, 200]
            Here, as there are ten values (an even number of values), the median is halfway between the fifth & sixth data
            values, which gives us 110 as the median, or Q2.
                20       40        60       80       100      110       120      140       160      180       200
                                                               Q2

            The first quartile or Q1 is the median of all the values to the left of Q2. So here, 60 is the middle number of numbers
            to the left of the actual median (Q2).

            The third quartile or Q3 is the median of all the values to the right of Q2. Thus here, 160 is the middle number of
            numbers to the right of the actual median (Q2).

                20       40        60       80       100      110       120      140       160      180       200
                                  Q1                           Q2                          Q3



                                                                                               Data Merging    183
   180   181   182   183   184   185   186   187   188   189   190