Calculating the Median from Grouped Data
A special quantitative analysis technique is useful when analyzing a group of data in a frequency distribution. Some government surveys and other data collection points may present data in intervals and record the frequency with which the observations appear in each of the intervals. When data sources are presented in intervals the median value can be derived as illustrated in the example below.
Example: You are reviewing your company's salary structure and want to compare your company's salaries for accountants with a survey you found on the Internet. However, the complimentary survey presents data in the form of a frequency distribution. You now need to convert that data to determine the median class for your location. You can calculate the median from the grouped data in order to compare the difference in the median salaries for accountants in your company and in the labor market.
You have collected the following data:
| Accounts Payable Associate Salary ($)* | ||
|---|---|---|
| Range in Dollars | Frequency | |
| 1 | 30,000 - 33,000 | 4 |
| 2 | 33,001 - 35,000 | 6 |
| 3 | 35,001 - 37,000 | 9 |
| 4 | 37,001 - 39,000 | 13 |
| 5 | 39,001 - 41,000 | 47 |
| 6 | 41,001 - 43,000 | 51 |
| 7 | 43,001 - 45,000 | 58 |
| 8 | 45,001 - 47,000 | 82 |
| 9 | 47,001 - 49,000 | 187 |
| 10 | 49,001 - 51,000 | 145 |
| 11 | 51,001 - 53,000 | 123 |
| 12 | 53,001 - 55,000 | 78 |
| 13 | 55,001 - 57,000 | 67 |
| 14 | 57,001 - 59,000 | 15 |
| 15 | 59,001 - 61,000 | 5 |
| Total | 890 | |
Step 1: Locate the median class (or interval)
Since the median is defined as the rank ordered central tendency, the first step is to identify the interval for the median value within the fifteen class intervals. To do so:
-
Add the frequencies (or observations) in the frequency column.
-
Since there are 890 data points, an even number, the value for n / 2 = 445. If the number of observations is an odd number, use (n + 1) / 2 to get a whole number.
-
Since the cumulative frequency for the first eight classes is only 270 (4 + 6 + 9 + 13 + 47 + 51 + 58 + 82) thus the 445th observation must be located in the 9th class (the interval from $47,001 - $49,000)
Step 2: Interpolate to find the median
The median class for this 9th interval contains 187 observations. Assuming that these 187 values are evenly spaced throughout the class interval, we can interpolate to find the value for the 445th observation. First, we determine that the 445th item is the 175th element in the median class:
-
Items in the first eight classes equal 270 (4 + 6 + 9 + 13 + 47 + 51 + 58 + 82)
-
445 - 270 (items in the first eight classes) = 175
Step 3: Calculate the width of the 187 equal steps
-
Take the first item in the 10th interval ($49,001) and subtract the first item of the 9th interval, median class, ($47,001); $49,001 - $47,001 = $2,000.
-
Divide that quantity by 187 which equals $10.7
-
Now, if there are 187 steps of $10.7 each and if 174 steps takes us to the 175th item, then the 175th item is:
($10.7 x 174) + $47,001 = $48,863 (rounding)
Therefore, we can use $48,863 as the value of the 175th observation.
Memory Jogger
The median can be determined from grouped data with: