How would you build a confidence interval for a median or another quantile, and why can this be harder than for a mean?

Last updated 20 July 2026

  • Harder than a mean: the median's variance is 1/(4*n*f(m)^2), which requires the unknown, noisy-to-estimate data density at the median. Extreme quantiles are especially unstable.

  • Preferred methods sidestep density estimation: an exact order-statistic interval (two sorted values chosen via the binomial distribution, fully distribution-free) or a bootstrap of the median.

  • For large n, an asymptotic normal approximation using a density estimate also works.

  • https://acclab.github.io/bootstrap-confidence-intervals.html
  • https://faculty.washington.edu/yenchic/25A_stat535/bootstrap_variants.html
  • https://staff.math.su.se/hoehle/blog/2016/10/23/quantileCI.html
  • https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/mediancl.htm
All Confidence Intervals interview questions