Reference algorithm/formula for the distribution of the median of random variables?

58 Views Asked by At

The distribution of the mean of two random variables can be calculated using a convolution. I have a collection of $n$ independent random variables each with PDFs that are simple functions on $[0,1]$. I would like to know the exact distribution of the median of these variables. I understand there is a central limit theorem for the distribution of the sample median for i.i.d variables, but I don't have that assumption here. I also see that there's a way to get a formula for discrete random variables. Is there a reference for continuous random variables?

1

There are 1 best solutions below

3
On BEST ANSWER

Assuming the number of your random variables is $2n,$ the probability that the median is $x$ equals $$m(x)=\sum_{\mbox{subsets I of size $n$}}\prod_{i \in I} F_i(x) \prod_{j\notin I}(1-F_i(x),$$ where $F_k$ is the CDF of the $k$-th variable. Needless to say, for $n$ large (as in, bigger than about 6), this is not super useful. If the variables are $i.i.d,$ this is a fairly civilized formula.