Method 1There are different methods for calculating quartiles that mostly differ in their treatment of the median itself. The following is a reasonable way to calculate a quartile.1. Sort the set of data2. Identify the median3. Split the set in two halves using the median. If there are an even number of values, split the set exactly in half. If their are an odd number of values, include the median in both sets.4. Repeat step #3 on the halves to produce quarters.The values are now sorted into four quartiles. Notice the overlapping median values. The 3rd and 4th quartile are commonly merged into a middle quartile as follows.
Method 2It is also common to exclude the median when dividing odd numbered sets. To do this, repeat the same steps above except that the median is excluded when dividing the sets in half in step #3. This results in no overlap in the quartiles.
|Definition||A set of data that has been divided into four sets of equal size based on ranked and ordered values.|
Statistics »Algorithms »Data »