Interquartile range: Why add 1 to the sample size

#1
My understanding is that the interquartile range is calculated by taking the difference between the (N+1)*0.75th observation and the (N+1)*0.25th observation. For example, with 7 observations, one would take the difference between observations 6 and 2.

My question is this: Why do we add 1 to the sample size in this calculation? This isn't done when taking the median, so I'm wondering why it's done when taking percentiles.

Thanks very much in advance.
 

BGM

TS Contributor
#2
I think there is no universal formula to calculate the sample quartile.

Even in your case, you do not guarantee \( n + 1 \) is divisible by \( 4 \);
Round up/down already result in two different estimates.

So just live with one of the reasonable estimates is ok.