For observations and , the sample quantile in the generalized-inverse convention iswhere is the empirical distribution function and the observations are ordered with ties retained. For five observations, the sample median in this convention is the third order statistic. Interpolated sample-quantile conventions can give different finite-sample answers.
For the asymptotic statement, assume the observations are independent and identically distributed with cumulative distribution function . Let be its unique -quantile, and suppose has a density continuous and strictly positive at . ThenFor a proof, is exactly the event that at least observations are at most . At , the count is binomial with success probability . The binomial central limit theorem gives the displayed normal limit. A larger density at the target quantile makes the quantile more precisely estimated. The independence and local-density hypotheses are needed; the formula cannot be applied unchanged to arbitrary dependent observations or an atom.
New to topics? Read the docs here!