In: Math
This example was previously posted, but how did we come up with a Q1 result of 28.5 and a Q3 result of 123.3 for the question below? I am wondering where I went wrong here, as the results to this question have already been posted. The results I have are Q1 of 29 and Q3 of 121 with a median of 69. I have IQR as 92 and for outliers I have -109 for lower limit and 259 for upper limit. I am wondering how we came up with 28.5 for Q1 and 123.3 for Q3. Once I understand this, then figuring out IQR and outlier limits makes sense.
Hospital - Infections
1 | 89 |
2 | 58 |
3 | 96 |
4 | 206 |
5 | 31 |
6 | 16 |
7 | 249 |
8 | 79 |
9 | 29 |
10 | 6 |
11 | 222 |
12 | 108 |
13 | 58 |
14 | 54 |
15 | 81 |
16 | 64 |
17 | 9 |
18 | 130 |
19 | 37 |
20 | 121 |
21 | 27 |
22 | 6 |
23 | 95 |
24 | 7 |
25 | 18 |
26 | 37 |
27 | 140 |
28 | 74 |
29 | 134 |
30 | 184 |
Arranging the data in ascending order, we get
1 | 6 |
2 | 6 |
3 | 7 |
4 | 9 |
5 | 16 |
6 | 18 |
7 | 27 |
8 | 29 |
9 | 31 |
10 | 37 |
11 | 37 |
12 | 54 |
13 | 58 |
14 | 58 |
15 | 64 |
16 | 74 |
17 | 79 |
18 | 81 |
19 | 89 |
20 | 95 |
21 | 96 |
22 | 108 |
23 | 121 |
24 | 130 |
25 | 134 |
26 | 140 |
27 | 184 |
28 | 206 |
29 | 222 |
30 | 249 |
The method by which you have found Q1 = 29, Median = 69, Q3 = 121 is the method of index
where Index of Q1 = 0.25 * 30 = 7.5, and therefore the 8th value, index of Q3 = 0.75 * 30 = 22.5, therefore the 23rd value = 121
and Q2 = 0.5 * 30 = 15, therefore the average of the 15th and the 16th value = 138/2 = 69
______________________________________________
There is another method by which we find Q1 and Q3
Where Q1 = 0.25 * (n + 1) = 0.25 * 31 = 7.75.
Therefore Q1 = 7th value + 0.75( 8th value - 7th value) = 27 + 0.75 * (29 - 27) = 27 + 1.5 = 28.5
Similarly Q3 = 0.75 * (n + 1) = 0.75 * 31 = 23.25.
Therefore Q3 = 23rd value + 0.25( 24th value - 23rd value) = 121 + 0.25 * (130 - 121) = 121 + 2.25 = 123.25