IQR stands for Interquartile Range. Its the difference (range) between the first quartile and the third. It is sometimes called the middle fifty. One-fourth of the values fall beneath the first quartile (Q1) and one-fourth lie above the third quartile (Q3). The numbers must be arranged in order before the IQR can be found.
Picture a line cut into four equal parts. There are three cuts to make four parts. The first cut is the first quartile and the third cut is the third quartile. The IQR wil be Q3 - Q1.
For example: find the IQR of 145, 149, 158, 146, 159, 156, 154, 149, 158, 148
Step 1.
Order the numbers smallest to greatest.
>>> 145, 146, 148, 149, 149, 154, 156, 158, 158, 159
Step 2.
Find Q1's location using this equation:
(1/4)(n+1)
n is the number of values in the list. Here, n=10.
If you are imagining the numbers as a line, n+1 gives you the "length"
>>>2.75
Step 3.
Get Q1 using the answer found in step 2. There are three cases:
Case 1. If the answer to step 2 is a whole number, then Q1 is the number found at (1/4)(n+1) position in the ordered list. For example, if n=7, then (1/4)(n+1) = 2, therefore Q1 is the number found at position 2.
Case 2. If the answer to step 2 is a fractional half, then Q1 is the average of the two values found by rounding the position both down and up. For example: if n=29, then (1/4)(n+1) =7.5, therefore take the average of the values found at positions 7 and 8.
Case 3. If it’s neither a whole number nor a fractional half, then round to the nearest integer. For example: if n=14, then (1/4)(n+1)=3.75, therefore Q1 is the value found at position 4.
>>>148
Step 4.
Find Q3's location:
(3/4)(n+1)
>>>8.25
Step 5.
Using the answer to step 4, locate the value of Q3. Follow the same cases as described in step 3.
>>>158
Step 6.
Calculate the range:
Q3 - Q1
>>>10
>>>The IQR of 145, 149, 158, 146, 159, 156, 154, 149, 158, 148 is 10.