Interquartile Range
The interquartile range of an observation variable is the difference of its upper and lower quartiles. It is a measure of how far apart the middle portion of data spreads in value.
Problem
Find the interquartile range of eruption duration in the data set faithful.
Solution
We apply the IQR function to compute the interquartile range of eruptions.
> IQR(duration) # apply the IQR function
[1] 2.2915
Answer
The interquartile range of eruption duration is 2.2915 minutes.
Exercise
Find the interquartile range of eruption waiting periods in faithful.