Hi guys, just wanted to understand conceptually here- why can you not have n = 2, and not have IQR < Range? Why is the minimum n = 4?
Say i had elements 1,2. Wouldn’t median be 1.5 and Q1 would thus be 1.25, Q3 would be 1.75.
So range = 2-1 = 1. and IQR would be 1.75-1.25 = 0.5 which is less than range.
Or am I misunderstanding the concept of IQR? My understanding is for a set of numbers, Quartile values don’t necessarily have to be part of the dataset, which is why I figured my approach would be sound.
Would appreciate any help on this!
Yes, you misunderstood the part where you calculate quartiles. if 1,3 is only 2 numbers median is 2 but q1 and q3 will still be 1,3 respectively. Which makes IQR = range. You have misconception about how to calculate IQR.
But how come in sets with greater number of elements, we have Q1, Q3 values that aren’t necessarily in the data set?
I also ran into this - not sure why 1,2,3 does not work as it has Q1 =1.5, Q2=2, Q3=2.5 and fits the question criteria (IQR = 2.5-1.5=1 and Range=3-1=2). Why is 4 the minimum value?
Q1 and Q3 are not what you identified them to be.