Distribution of the Median
by greenturtle3141, Apr 8, 2022, 8:21 PM
Reading Difficulty: 4/5
reals are chosen uniformly at random from the interval
. Let random variable
be the median of these numbers. What is the distribution of
?
CLAIM:
is a continuous random variable with density:
![$$f_n(x)=(2n+1)\binom{2n}{n}x^n(1-x)^n \cdot 1_{[0,1]}(x)$$](//latex.artofproblemsolving.com/a/c/2/ac2f8f057a32f76e49015b6f4d596596728325b5.png)
Proof. Let's try to compute the CDF,
. For
we have that
iff at least
of the random reals chosen lie in
. Such an event may be partitioned into the following
events:
Computing the probability that exactly
of the numbers lie in
may be reasoned as follows: There are
ways to choose which
of the numbers will lie in
. Then the probability that these
numbers lie in
is
, and the probability that the other
numbers lie in
is
. Altogether, this is a probability of
.
It follows that:
Since this is (absolutely) continuous, we deduce that indeed
is a continuous random variable and that a density exists.
You might think that we're now going to brutally expand this, differentiate, and then pray that the result is the claimed density... but some beautiful magic happens if we differentiate now:
Let's examine this first term:
Wait, isn't that the claimed density? Now we just need to show that everything else just zeroes out I guess... indeed, this series telescopes! To see why, just manipulate this expression, for
:

Wow! So everything cancels except the very first term (the claimed density) and the very last term (which is just
). 
For fun we can now compute the expectation and variance of
.
CLAIM:
Proof. I mean, duh.
CLAIM:
Proof. A simple inductive argument shows that for all
, we have:
Applying this, we have:

And if you trust me, this ends up simplifying nicely to the claimed variance. 

![$[0,1]$](http://latex.artofproblemsolving.com/e/8/6/e861e10e1c19918756b9c8b7717684593c63aeb8.png)


CLAIM:

![$$f_n(x)=(2n+1)\binom{2n}{n}x^n(1-x)^n \cdot 1_{[0,1]}(x)$$](http://latex.artofproblemsolving.com/a/c/2/ac2f8f057a32f76e49015b6f4d596596728325b5.png)
Proof. Let's try to compute the CDF,




![$[0,t]$](http://latex.artofproblemsolving.com/9/3/9/9398cf678fee12444e20e80c8ec38bb2803749fb.png)

- Exactly
of the numbers lie in
.
- Exactly
of the numbers lie in
.
- ...
- Exactly
of the numbers lie in
.
Computing the probability that exactly

![$[0,t]$](http://latex.artofproblemsolving.com/9/3/9/9398cf678fee12444e20e80c8ec38bb2803749fb.png)


![$[0,t]$](http://latex.artofproblemsolving.com/9/3/9/9398cf678fee12444e20e80c8ec38bb2803749fb.png)

![$[0,t]$](http://latex.artofproblemsolving.com/9/3/9/9398cf678fee12444e20e80c8ec38bb2803749fb.png)


![$(t,1]$](http://latex.artofproblemsolving.com/d/0/9/d09224ae5de063157ea0b178112e8b00db3d9ebb.png)


It follows that:


You might think that we're now going to brutally expand this, differentiate, and then pray that the result is the claimed density... but some beautiful magic happens if we differentiate now:







For fun we can now compute the expectation and variance of

CLAIM:

Proof. I mean, duh.

CLAIM:

Proof. A simple inductive argument shows that for all




