Sample quantile (source code)

= Sample quantile
{title2=$\widehat F_n^{-1}(p)=X_{(\lceil np\rceil)}$}

= Empirical quantile
{synonym}

For $0<p<1$, the <sample quantile> is the generalized inverse of the <empirical distribution function>: $\inf\{x:\widehat F_n(x)\geq p\}$. With ordered observations this is $X_{(\lceil np\rceil)}$, including ties. If the population <probability density function> is continuous and positive at its unique $p$th <quantile>, the centered quantile has asymptotic variance $p(1-p)/f(F^{-1}(p))^2$ under scaling by $\sqrt n$.