In calculation of the IQM, only the data between the first and third quartiles is used, and the lowest 25% and the highest 25% of the data are discarded. assuming the values have been ordered.
The method is best explained with an example. Consider the following dataset: First sort the list from lowest-to-highest: There are 12 observations in the dataset, thus we have 4 quartiles of 3 numbers. Discard the lowest and the highest 3 values: We now have 6 of the 12 observations remaining; next, we calculate the arithmetic mean of these numbers: This is the interquartile mean. For comparison, the arithmetic mean of the original dataset is due to the strong influence of the outlier, 38.
Dataset size not divisible by four
The above example consisted of 12 observations in the dataset, which made the determination of the quartiles very easy. Of course, not all datasets have a number of observations that is divisible by 4. We can adjust the method of calculating the IQM to accommodate this. So ideally we want to have the IQM equal to the mean for symmetric distributions, e.g.: has a mean valuexmean = 3, and since it is a symmetric distribution, xIQM = 3 would be desired. We can solve this by using a weighted average of the quartiles and the interquartile dataset: Consider the following dataset of 9 observations: There are 9/4 = 2.25 observations in each quartile, and 4.5 observations in the interquartile range. Truncate the fractional quartile size, and remove this number from the 1st and 4th quartiles. Thus, there are 3 full observations in the interquartile range, and 2 fractional observations. Since we have a total of 4.5 observations in the interquartile range, the two fractional observations each count for 0.75. The IQM is now calculated as follows: In the above example, the mean has a value xmean = 9. The same as the IQM, as was expected. The method of calculating the IQM for any number of observations is analogous; the fractional contributions to the IQM can be either 0, 0.25, 0.50, or 0.75.
The interquartile mean shares some properties of both the mean and the median:
Like the median, the IQM is insensitive to outliers; in the example given, the highest value was an obvious outlier of the dataset, but its value is not used in the calculation of the IQM. On the other hand, the common average is sensitive to these outliers: xmean = 8.5.
Like the mean, the IQM is a distinct parameter, based on a large number of observations from the dataset. The median is always equal to one of the observations in the dataset. The mean can be equal to any value between the lowest and highest observation, depending on the value of all the other observations. The IQM can be equal to any value between the first and third quartiles, depending on all the observations in the interquartile range.
Related statistics
Interquartile range
Midhinge
Trimean
Applications
London Interbank Offered Rate estimates a reference interest rate as the interquartile mean of the rates that several banks offer.
Everything2 uses the interquartile mean of the reputations of a user's writeups to determine the quality of the user's contribution.