A quartile with tied observations

The ordered sample is 2, 2, 2, 9. Find the 0.75 quantile by the empirical-CDF inverse and by R’s type-7 rule. What does the difference show?

The empirical inverse uses ceil(4×0.75)=3 and returns x_(3)=2: three of four values are already at most 2. Type 7 uses h=1+3×0.75=3.25 and returns 2+0.25(9−2)=3.75. Interpolation can put a reported quantile where no value was observed, especially when a large CDF jump from ties sits beside a gap.