Median
Derivation of the asymptotic distribution

We take the sample size to be an odd number N = 2 n + 1 {\displaystyle N=2n+1} and assume our variable continuous; the formula for the case of discrete variables is given below in § Empirical local density. The sample can be summarized as "below median", "at median", and "above median", which corresponds to a trinomial distribution with probabilities F (v) {\displaystyle F(v)}, f (v) {\displaystyle f(v)} and 1 − F (v) {\displaystyle 1-F(v)}. For a continuous variable, the probability of multiple sample values being exactly equal to the median is 0, so one can calculate the density of at the point v {\displaystyle v} directly from the trinomial distribution:

Now we introduce the beta function. For integer arguments α {\displaystyle \alpha } and β {\displaystyle \beta }, this can be expressed as B (α, β) = (α − 1) ! (β − 1) ! (α + β − 1) ! {\displaystyle \mathrm {B} (\alpha,\beta)={\frac {(\alpha -1)!(\beta -1)!}{(\alpha +\beta -1)!}}}. Also, recall that f (v) d v = d F (v) {\displaystyle f(v)\,dv=dF(v)}. Using these relationships and setting both α {\displaystyle \alpha } and β {\displaystyle \beta } equal to n + 1 {\displaystyle n+1} allows the last expression to be written as

Hence the density function of the median is a symmetric beta distribution pushed forward by F {\displaystyle F}. Its mean, as we would expect, is 0.5 and its variance is 1 / (4 (N + 2)) {\displaystyle 1/(4(N+2))}. By the chain rule, the corresponding variance of the sample median is

The additional 2 is negligible in the limit.
detectable_content:postscript, change_case:english_capital