Difference between revisions of "Notes:Distribution of the sample median"
From Maths
(Saving work) |
(Saving work, added more work!) |
||
Line 1: | Line 1: | ||
− | {{ProbMacros}} | + | {{ProbMacros}}{{M|\newcommand{\O}[0]{\mathcal{O} } \newcommand{\M}[0]{\mathcal{M} } \newcommand{\Q}[0]{\mathcal{Q} } \newcommand{\Min}[1]{\text{Min}\left({#1}\right)} }} |
__TOC__ | __TOC__ | ||
==Problem overview== | ==Problem overview== | ||
Line 7: | Line 7: | ||
==Initial work== | ==Initial work== | ||
Since the variables are independent then any ordering is as likely as any other (which I proved the long way, rather than just jumping to {{MM|\frac{1}{(2m+1)!} }} - silly me) however the result, found in [[Probability of i.i.d random variables being in an order and not greater than something]] will be useful. | Since the variables are independent then any ordering is as likely as any other (which I proved the long way, rather than just jumping to {{MM|\frac{1}{(2m+1)!} }} - silly me) however the result, found in [[Probability of i.i.d random variables being in an order and not greater than something]] will be useful. | ||
+ | |||
+ | |||
+ | I believe the {{M|\P{\text{Median}(X_1,\ldots,X_{2m+1})\le r}\eq\Pcond{X_1\le\cdots\le X_{m+1}\le r}{X_1\le\cdots\le X_{2m+1} } }}. Let us make some definitions to make this shorter. | ||
+ | * {{M|\mathcal{O}:\eq X_1\le\cdots\le X_{2m+1} }} - representing the order part | ||
+ | * {{M|\mathcal{M}:\eq X_1\le\cdots\le X_{m+1}\le r}} - representing the median part | ||
+ | * {{M|\mathcal{Q}:\eq\P{\text{Median}(X_1,\ldots,X_{2m+1})\le r}\eq\Pcond{\mathcal{O} }{\mathcal{O} } }} - representing the question | ||
+ | |||
+ | |||
+ | We should also have some sort of converse, related to {{M|r\le X_{m+2}\le\cdots X_{2m+1} }} or something. | ||
+ | |||
+ | |||
+ | We also have: | ||
+ | * An expression for {{M|\P{X_1\le \cdots\le X_n\le r} }} from [[Probability of i.i.d random variables being in an order and not greater than something]] | ||
+ | ** It's {{MM|\eq\frac{1}{n!}F_X(r)^n}} | ||
+ | ===Analysis=== | ||
+ | Let us look at {{M|X\le r}} and {{M|X\le Y}} to see what we can say if both are true (the "{{link|and|logic}}") | ||
+ | * '''Claim:''' {{M|(X\le r\wedge X\le Y)\iff(X\le\Min{r,Y})}} | ||
+ | * '''Proof:''' | ||
+ | ** {{M|\implies}} | ||
+ | **# Suppose {{M|r\le Y}}, so {{M|\Min{r,Y}\eq r}}, obviously {{M|X\le r\ \implies\ X\le r\eq\Min{r,Y} }}, so the implication holds in this case | ||
+ | **# Suppose {{M|Y\le r}}, so {{M|\Min{r,Y}\eq Y}}, obviously {{M|X\le Y\ \implies\ X\le Y\eq\Min{r,Y} }}, so the implication holds in this case too. | ||
+ | ** {{M|\impliedby}} | ||
+ | *** We notice either {{M|\Min{r,Y}\eq r}} if {{M|r\le Y}}, or {{M|\Min{r,Y}\eq Y}} if {{M|Y\le r}} (slightly modify the language for the equality, it doesn't matter though really) | ||
+ | **** Thus if {{M|r\le Y}} then {{M|X\le r}} and as {{M|r\le Y}} by assumption, we use the {{link|transitivity|relation}} of {{M|\le}} to see {{M|X\le r\le Y}} thus {{M|X\le Y}} too - as required | ||
+ | **** Thus if {{M|Y\le r}} then {{M|X\le Y}} and as {{M|Y\le r}} by assumption, we use the transitivity of {{M|\le}} to see {{M|X\le Y\le r}} and thus {{M|X\le r}} too - as required. | ||
+ | *** So in either case, we have {{M|X\le Y}} and {{M|X\le r}} - as required | ||
+ | ==Problem statement== | ||
+ | Thus we really want to find: | ||
+ | * {{M|\P{\text{Median}(X_1,\ldots,X_{2m+1})\le r}\eq\Pcond{X_1\le\cdots\le X_{m+1}\le r}{X_1\le\cdots\le X_{2m+1} } }} | ||
+ | *: {{MM|\eq\frac{\P{\M\ \text{and}\ \O} }{\P{\O} } }} | ||
+ | *: {{MM|\eq \big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+3}\cdots\le X_{2m+1} } }} | ||
+ | ** Notice that we use {{M|(X\le\Min{r,Y})\iff(X\le r\wedge X\le Y)}} here. {{Caveat|But is it enough to get {{M|(X\le r\wedge X\le Y\le Z)\iff(X\le\Min{r,Y}\le Z)}}?}} - we only need an implication. |
Revision as of 03:29, 12 December 2017
Problem overview
Let X1,…,X2m+1 be a sample from a population X, meaning that the Xi are i.i.d random variables, for some m∈N0. We wish to find:
- P[Median(X1,…,X2m+1)≤r]- the Template:Cdf of the median.
Initial work
Since the variables are independent then any ordering is as likely as any other (which I proved the long way, rather than just jumping to 1(2m+1)!
- silly me) however the result, found in Probability of i.i.d random variables being in an order and not greater than something will be useful.
I believe the P[Median(X1,…,X2m+1)≤r]=P[X1≤⋯≤Xm+1≤r | X1≤⋯≤X2m+1]. Let us make some definitions to make this shorter.
- O:=X1≤⋯≤X2m+1 - representing the order part
- M:=X1≤⋯≤Xm+1≤r - representing the median part
- Q:=P[Median(X1,…,X2m+1)≤r]=P[O | O] - representing the question
We should also have some sort of converse, related to r≤Xm+2≤⋯X2m+1 or something.
We also have:
- An expression for P[X1≤⋯≤Xn≤r] from Probability of i.i.d random variables being in an order and not greater than something
- It's =1n!FX(r)n
- It's =1n!FX(r)n
Analysis
Let us look at X≤r and X≤Y to see what we can say if both are true (the "and")
- Claim: (X≤r∧X≤Y)⟺(X≤Min(r,Y))
- Proof:
- ⟹
- Suppose r≤Y, so Min(r,Y)=r, obviously X≤r ⟹ X≤r=Min(r,Y), so the implication holds in this case
- Suppose Y≤r, so Min(r,Y)=Y, obviously X≤Y ⟹ X≤Y=Min(r,Y), so the implication holds in this case too.
- ⟸
- We notice either Min(r,Y)=r if r≤Y, or Min(r,Y)=Y if Y≤r (slightly modify the language for the equality, it doesn't matter though really)
- Thus if r≤Y then X≤r and as r≤Y by assumption, we use the transitivity of ≤ to see X≤r≤Y thus X≤Y too - as required
- Thus if Y≤r then X≤Y and as Y≤r by assumption, we use the transitivity of ≤ to see X≤Y≤r and thus X≤r too - as required.
- So in either case, we have X≤Y and X≤r - as required
- We notice either Min(r,Y)=r if r≤Y, or Min(r,Y)=Y if Y≤r (slightly modify the language for the equality, it doesn't matter though really)
- ⟹
Problem statement
Thus we really want to find:
- P[Median(X1,…,X2m+1)≤r]=P[X1≤⋯≤Xm+1≤r | X1≤⋯≤X2m+1]
- =P[M and O]P[O]
- =((2m+1)!)P[X1≤⋯≤Xm+1≤Min(r,Xm+2)≤Xm+3⋯≤X2m+1]
- Notice that we use (X≤Min(r,Y))⟺(X≤r∧X≤Y) here. Caveat:But is it enough to get (X≤r∧X≤Y≤Z)⟺(X≤Min(r,Y)≤Z)? - we only need an implication.
- =P[M and O]P[O]