Difference between revisions of "Notes:Distribution of the sample median"
(Saving work) |
m (Added prediction for n=9) |
||
(14 intermediate revisions by the same user not shown) | |||
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)} \newcommand{\d}[0]{\mathrm{d} } }} |
__TOC__ | __TOC__ | ||
+ | ==Findings== | ||
+ | I've found results for two sample sizes, {{M|n\eq 3}} and {{M|n\eq 5}}, they are respectively: | ||
+ | * {{M|F(r)^2\big[3-2F(r)\big]}} for {{M|n\eq 3}}, and | ||
+ | * {{M|F(r)^3\big[10-15F(r)+6F(r)^2\big]}} for {{M|n\eq 5}} | ||
+ | ** I've experimentally verified this one | ||
+ | * {{M|F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)}} for {{M|n\eq 7}} | ||
+ | Unfortunately it seems prior results are of no help | ||
+ | * {{M|F(r)^5\big(70F(r)^4-315F(r)^3+540F(r)^2-420F(r)+126\big)}} '''''PREDICTED''''' for {{M|n\eq 9}} | ||
+ | ==Important results== | ||
+ | # {{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{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1} } }{\frac{1}{(2m+1)!} } }} | ||
+ | #: {{MM|\eq \big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1} } }} | ||
+ | #: {{MM|\eq \lim_{t\rightarrow+\infty}\Bigg(\big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1}\le t }\Bigg) }} | ||
+ | #: {{MM|\eq\frac{(2m+1)!}{m!}\lim_{t\rightarrow+\infty}\Bigg[\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1})F(x_{m+1})^m\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1}\Bigg] }} | ||
+ | |||
==Problem overview== | ==Problem overview== | ||
Let {{M|X_1,\ldots,X_{2m+1} }} be a sample from a population {{M|X}}, meaning that the {{M|X_i}} are {{iid}} [[random variables]], for some {{M|m\in\mathbb{N}_{0} }}. We wish to find: | Let {{M|X_1,\ldots,X_{2m+1} }} be a sample from a population {{M|X}}, meaning that the {{M|X_i}} are {{iid}} [[random variables]], for some {{M|m\in\mathbb{N}_{0} }}. We wish to find: | ||
Line 7: | Line 22: | ||
==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{M} }{\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+2}\le X_{m+3}\cdots\le X_{2m+1} } }} | ||
+ | ** {{Caveat|We now need:}} {{MM|\big(X\le r\wedge X\le Y\le Z\big)\implies\big(X\le\Min{r,Y}\le Y\le Z\big)}} to justify this format. Although that's arguably not that helpful for the integral. | ||
+ | ==Initial integral== | ||
+ | : This isn't about the median specifically, this is just looking at the specific integral. | ||
+ | Suppose we have a sample of length 3, {{M|X,Y,Z}} then we are looking at: | ||
+ | * {{M|\P{X\le\Min{r,Y}\le Y\le Z\le t} }} (where {{M|t}} will be used for a limit towards {{m|\infty}} to get {{M|\P{X\le \Min{r,Y}\le Y\le Z} }} in the end), or as an integral: | ||
+ | ** {{MM|\int^t_{-\infty}f(z)\left(\int^z_{-\infty}f(y)\left(\int^{\Min{r,y} }_{-\infty} f(x)\d x\right)\d y\right)\d z}} | ||
+ | *** if {{M|t>r}} then the minimum will get involved (for some {{M|z}}s anyway) and limit it to {{M|r}}, otherwise it'll always stay under {{M|r}} - of course in practice (as we'll take {{M|t\rightarrow\infty}}) this will certainly happen. | ||
+ | ==Progression: 1== | ||
+ | We are evaluating: {{MM|\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\cdots\le X_{2m+1}\le t } }} (our answer is {{MM|\big((2m+1)!\big)\times}} of this as {{M|t\rightarrow\infty}} ), the full integral follows: | ||
+ | * {{MM|\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1})<!-- | ||
+ | |||
+ | MARKER: (int^x_m+1 ... \d x_m starts here | ||
+ | I want to put an underbrace around it. | ||
+ | |||
+ | --><!--\underbrace-->{\left(\int^{x_{m+1} }_{-\infty}f(x_{m} )\left(\cdots\int^{x_2}_{-\infty}f(x_1)\d x_1\cdots\right)\d x_m\right)}<!-- | ||
+ | |||
+ | Marker: \d x_m ends here | ||
+ | |||
+ | |||
+ | -->\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1} }} | ||
+ | We operate on the inner bit: | ||
+ | * {{MM|{\int^{x_{m+1} }_{-\infty}f(x_{m} )\left(\cdots\int^{x_2}_{-\infty}f(x_1)\d x_1\cdots\right)\d x_m}\eq \frac{1}{m!}F(x_{m+1})^m}} | ||
+ | We substitute this back in to yield: | ||
+ | * {{MM|\frac{1}{m!}\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1})F(x_{m+1})^m\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1} }} | ||
+ | ===Conclusion of progression 1=== | ||
+ | We see here that | ||
+ | ==Progression: 2== | ||
+ | This'll involve induction and dealing with the {{M|\text{Min}()}} will be "tricky", both for practice and induction we will consider the special cases {{M|m\eq 1}} and {{M|m\eq 2}} by evaluating: | ||
+ | * {{M|m\eq 1}} yields {{MM|I_1:\eq\frac{1}{1!}\int^t_{-\infty} f(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3}}, by case analysis: | ||
+ | *# if {{M|t\le r}} then {{M|x_3\le t\le r}} or {{M|x_3\le r}} over the entire domain of interest, so {{M|\Min{r,x_3}\eq x_3}} over the entire domain, giving: | ||
+ | *#* {{MM|I_1\eq\frac{1}{1!}\int^t_{-\infty}f(x_3)\left(\int^{x_3}_{-\infty}f(x_2)F(x_2)\d x_2\right)\d x_3}} | ||
+ | *#** We now use the corollary below to see: | ||
+ | *#*** {{MM|I_1\eq\frac{1}{2!}\int^t_{-\infty}f(x_3)F(x_3)^2\d x_3}} | ||
+ | *#***: {{MM|\eq\frac{1}{3!}F(t)^3}} | ||
+ | *# if {{M|t\ge r}} then we split {{M|(-\infty,t]}} into {{M|(-\infty,r)}} and {{M|[r,t]}}, giving: | ||
+ | *#* {{MM|I_1\eq\frac{1}{1!}\left[\int^r_{-\infty} f(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3+\int_r^tf(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3\right]}} | ||
+ | *#*: {{MM|\eq\frac{1}{1!}\left[\int^r_{-\infty}f(x_3)\left(\int^{x_3}_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3+\int_r^tf(x_3)\left(\int^r_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3\right]}} | ||
+ | *#** We now use the required corollary immediately below to yield: | ||
+ | *#**: {{MM|I_1\eq\frac{1}{1!}\left[\int^r_{-\infty}f(x_3)\cdot\frac{1}{2}F(x_3)^2\d x_3+\int_r^tf(x_3)\cdot\frac{1}{2}F(r)^2\d x_3\right]}} | ||
+ | *#**: {{MM|\eq\frac{1}{2!}\left[\frac{1}{3}F(r)^3+F(r)^2\int^t_rf(x_3)\d x_3\right]}}, note that: {{MM|\int^t_rf(x)\d x\eq\int_{-\infty}^tf(x)\d x-\int_{-\infty}^rf(x)\d x}} {{MM|\eq F(t)-F(r)}} | ||
+ | *#**: {{MM|\eq\frac{1}{2!}F(r)^2\left[\frac{1}{3}F(r)+\big(F(t)-F(r)\big)\right]}}, note that: {{MM|F(t)-F(r)\eq\frac{3F(t)-3F(r)}{3} }} which we'll use next | ||
+ | *#**: {{MM|\eq\frac{1}{2!}F(r)^2\left[\frac{3F(t)-2F(r)}{3}\right]}} | ||
+ | *#**: {{MM|\eq\frac{1}{3!}F(r)^2\big(3F(t)-2F(r)\big)}} | ||
+ | It is clear that as {{M|t\rightarrow\infty}} that we end up with {{MM|I_1\eq\frac{1}{3!}F(r)^2\big(3-2F(r)\big)}} | ||
+ | |||
+ | Thus: {{MM|\P{X_1\le X_2\le\Min{r,X_3}\le X_3}\eq\frac{1}{3!}F(r)^2\big(3-2F(r)\big)}} | ||
+ | |||
+ | Finally: | ||
+ | * {{MM|\Pcond{X_1\le X_2\le r}{X_1\le X_2\le X_3}\eq F(r)^2\big(3-2F(r)\big)}} | ||
+ | ===Required corollary=== | ||
+ | Recall from [[Probability of i.i.d random variables being in an order and not greater than something]] that: | ||
+ | * {{MM|\frac{1}{k!}\int^r_{-\infty}f(x)F(x)^k\d x\eq \frac{1}{(k+1)!}F(r)^{k+1} }} | ||
+ | So: | ||
+ | * {{MM|\int^r_{-\infty}f(x)F(x)^k\d x\eq \frac{1}{k+1}F(r)^{k+1} }} | ||
+ | By applying this to above (with the {{M|x_2}} integrals): | ||
+ | * {{MM|\int^r_{-\infty}f(x)F(x)^1\d x\eq \frac{1}{2}F(r)^2 }}, we then substitute this for the cases {{M|r:\eq r}} and {{M|r:\eq x_3}} | ||
+ | We'll then apply it to the {{M|x_3}} integrals. | ||
+ | ===Conclusion of progression 2=== | ||
+ | * {{MM|\Pcond{X_1\le X_2\le r}{X_1\le X_2\le X_3}\eq F(r)^2\big(3-2F(r)\big)}} | ||
+ | ==Progression: 3== | ||
+ | I am now looking at {{M|m\eq 3}}, which is 7 samples. To find this we evaluate: | ||
+ | * {{MM|\P{\text{Median}\le r}\eq\frac{7!}{3!}\lim_{t\rightarrow+\infty}\left(\int^t_{-\infty}f(x_7)\left(\int^{x_7}_{-\infty}f(x_6)\left(\int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\right)\d x_6\right)\d x_7\right)}} | ||
+ | Initial work: | ||
+ | # {{MM|I_1(x_6):\eq \int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\eq\left\{\begin{array}{lr}\frac{1}{5}\frac{1}{4}F(x_6)^5 && \text{if }x_6\le r\\\frac{1}{5}\frac{1}{4}F(r)^4\big(5F(x_6)-4F(r)\big) &&\text{if }x_6\ge r\end{array}\right.}} - these agree if {{M|x_6\eq r}} | ||
+ | # {{MM|I_2(x_7):\eq \int^{x_7}_{-\infty}f(x_6)\left(\int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\right)\d x_6\eq \int^{x_7}_{-\infty}f(x_6)I_1(x_6)\d x_6}} {{MM|\eq\frac{1}{6}\frac{1}{5}\frac{1}{4}\left\{\begin{array}{lr} F(x_7)^6 && \text{if }x_7\le r \\ F(r)^4\big(10F(r)^2-24F(r)F(x_7)+15F(x_7)^2\big) && \text{if }x_7\ge r\end{array}\right.}} - note both parts agree if {{M|r\eq x_7}} as {{M|10+15-24\eq 1}} | ||
+ | # {{M|I_3(t)\eq}} (everything in the limit) {{MM|\eq \int^t_{-\infty} f(x_7)I_2(x_7)\d x_7}} {{MM|\eq\frac{1}{7}\frac{1}{6}\frac{1}{5}\frac{1}{4}\left\{\begin{array}{lr}F(t)^7 && \text{if }t\le r \\ F(r)^4\big(-20 F(r)^3 + 70F(r)^2 F(t)-84F(r)F(t)^2+35F(t)^3\big) && \text{if }t\ge r\end{array}\right.}} - note these agree if {{M|t\eq r}} | ||
+ | #* Clearly as {{M|t\rightarrow+\infty}} we get {{MM|I_3(t)\rightarrow\frac{1}{7}\frac{1}{6}\frac{1}{5}\frac{1}{4} F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)}} as {{M|F(t)\rightarrow 1}} | ||
+ | |||
+ | From the top of this section: | ||
+ | * {{MM|\P{\text{Median}\le r}\eq \frac{7!}{3!} I_3(+\infty)\eq F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)}} | ||
+ | |||
+ | |||
+ | '''Conclusion:''' | ||
+ | * {{MM|\P{\text{Median}\le r}\eq F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)}} |
Latest revision as of 17:21, 17 December 2017
Contents
Findings
I've found results for two sample sizes, [ilmath]n\eq 3[/ilmath] and [ilmath]n\eq 5[/ilmath], they are respectively:
- [ilmath]F(r)^2\big[3-2F(r)\big][/ilmath] for [ilmath]n\eq 3[/ilmath], and
- [ilmath]F(r)^3\big[10-15F(r)+6F(r)^2\big][/ilmath] for [ilmath]n\eq 5[/ilmath]
- I've experimentally verified this one
- [ilmath]F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)[/ilmath] for [ilmath]n\eq 7[/ilmath]
Unfortunately it seems prior results are of no help
- [ilmath]F(r)^5\big(70F(r)^4-315F(r)^3+540F(r)^2-420F(r)+126\big)[/ilmath] PREDICTED for [ilmath]n\eq 9[/ilmath]
Important results
- [ilmath]\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} } [/ilmath]
- [math]\eq \frac{\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1} } }{\frac{1}{(2m+1)!} } [/math]
- [math]\eq \big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1} } [/math]
- [math]\eq \lim_{t\rightarrow+\infty}\Bigg(\big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\le\cdots\le X_{2m+1}\le t }\Bigg) [/math]
- [math]\eq\frac{(2m+1)!}{m!}\lim_{t\rightarrow+\infty}\Bigg[\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1})F(x_{m+1})^m\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1}\Bigg] [/math]
Problem overview
Let [ilmath]X_1,\ldots,X_{2m+1} [/ilmath] be a sample from a population [ilmath]X[/ilmath], meaning that the [ilmath]X_i[/ilmath] are i.i.d random variables, for some [ilmath]m\in\mathbb{N}_{0} [/ilmath]. We wish to find:
- [math]\P{\text{Median}(X_1,\ldots,X_{2m+1})\le r} [/math] - 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 [math]\frac{1}{(2m+1)!} [/math] - 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 [ilmath]\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} } [/ilmath]. Let us make some definitions to make this shorter.
- [ilmath]\mathcal{O}:\eq X_1\le\cdots\le X_{2m+1} [/ilmath] - representing the order part
- [ilmath]\mathcal{M}:\eq X_1\le\cdots\le X_{m+1}\le r[/ilmath] - representing the median part
- [ilmath]\mathcal{Q}:\eq\P{\text{Median}(X_1,\ldots,X_{2m+1})\le r}\eq\Pcond{\mathcal{M} }{\mathcal{O} } [/ilmath] - representing the question
We should also have some sort of converse, related to [ilmath]r\le X_{m+2}\le\cdots X_{2m+1} [/ilmath] or something.
We also have:
- An expression for [ilmath]\P{X_1\le \cdots\le X_n\le r} [/ilmath] from Probability of i.i.d random variables being in an order and not greater than something
- It's [math]\eq\frac{1}{n!}F_X(r)^n[/math]
Analysis
Let us look at [ilmath]X\le r[/ilmath] and [ilmath]X\le Y[/ilmath] to see what we can say if both are true (the "and")
- Claim: [ilmath](X\le r\wedge X\le Y)\iff(X\le\Min{r,Y})[/ilmath]
- Proof:
- [ilmath]\implies[/ilmath]
- Suppose [ilmath]r\le Y[/ilmath], so [ilmath]\Min{r,Y}\eq r[/ilmath], obviously [ilmath]X\le r\ \implies\ X\le r\eq\Min{r,Y} [/ilmath], so the implication holds in this case
- Suppose [ilmath]Y\le r[/ilmath], so [ilmath]\Min{r,Y}\eq Y[/ilmath], obviously [ilmath]X\le Y\ \implies\ X\le Y\eq\Min{r,Y} [/ilmath], so the implication holds in this case too.
- [ilmath]\impliedby[/ilmath]
- We notice either [ilmath]\Min{r,Y}\eq r[/ilmath] if [ilmath]r\le Y[/ilmath], or [ilmath]\Min{r,Y}\eq Y[/ilmath] if [ilmath]Y\le r[/ilmath] (slightly modify the language for the equality, it doesn't matter though really)
- Thus if [ilmath]r\le Y[/ilmath] then [ilmath]X\le r[/ilmath] and as [ilmath]r\le Y[/ilmath] by assumption, we use the transitivity of [ilmath]\le[/ilmath] to see [ilmath]X\le r\le Y[/ilmath] thus [ilmath]X\le Y[/ilmath] too - as required
- Thus if [ilmath]Y\le r[/ilmath] then [ilmath]X\le Y[/ilmath] and as [ilmath]Y\le r[/ilmath] by assumption, we use the transitivity of [ilmath]\le[/ilmath] to see [ilmath]X\le Y\le r[/ilmath] and thus [ilmath]X\le r[/ilmath] too - as required.
- So in either case, we have [ilmath]X\le Y[/ilmath] and [ilmath]X\le r[/ilmath] - as required
- We notice either [ilmath]\Min{r,Y}\eq r[/ilmath] if [ilmath]r\le Y[/ilmath], or [ilmath]\Min{r,Y}\eq Y[/ilmath] if [ilmath]Y\le r[/ilmath] (slightly modify the language for the equality, it doesn't matter though really)
- [ilmath]\implies[/ilmath]
Problem statement
Thus we really want to find:
- [ilmath]\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} } [/ilmath]
- [math]\eq\frac{\P{\M\ \text{and}\ \O} }{\P{\O} } [/math]
- [math]\eq \big((2m+1)!\big)\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\cdots\le X_{2m+1} } [/math]
- Caveat:We now need: [math]\big(X\le r\wedge X\le Y\le Z\big)\implies\big(X\le\Min{r,Y}\le Y\le Z\big)[/math] to justify this format. Although that's arguably not that helpful for the integral.
Initial integral
- This isn't about the median specifically, this is just looking at the specific integral.
Suppose we have a sample of length 3, [ilmath]X,Y,Z[/ilmath] then we are looking at:
- [ilmath]\P{X\le\Min{r,Y}\le Y\le Z\le t} [/ilmath] (where [ilmath]t[/ilmath] will be used for a limit towards [ilmath]\infty[/ilmath] to get [ilmath]\P{X\le \Min{r,Y}\le Y\le Z} [/ilmath] in the end), or as an integral:
- [math]\int^t_{-\infty}f(z)\left(\int^z_{-\infty}f(y)\left(\int^{\Min{r,y} }_{-\infty} f(x)\d x\right)\d y\right)\d z[/math]
- if [ilmath]t>r[/ilmath] then the minimum will get involved (for some [ilmath]z[/ilmath]s anyway) and limit it to [ilmath]r[/ilmath], otherwise it'll always stay under [ilmath]r[/ilmath] - of course in practice (as we'll take [ilmath]t\rightarrow\infty[/ilmath]) this will certainly happen.
- [math]\int^t_{-\infty}f(z)\left(\int^z_{-\infty}f(y)\left(\int^{\Min{r,y} }_{-\infty} f(x)\d x\right)\d y\right)\d z[/math]
Progression: 1
We are evaluating: [math]\P{X_1\le\cdots\le X_{m+1}\le\Min{r,X_{m+2} }\le X_{m+2}\le X_{m+3}\cdots\le X_{2m+1}\le t } [/math] (our answer is [math]\big((2m+1)!\big)\times[/math] of this as [ilmath]t\rightarrow\infty[/ilmath] ), the full integral follows:
- [math]\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1}){\left(\int^{x_{m+1} }_{-\infty}f(x_{m} )\left(\cdots\int^{x_2}_{-\infty}f(x_1)\d x_1\cdots\right)\d x_m\right)}\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1} [/math]
We operate on the inner bit:
- [math]{\int^{x_{m+1} }_{-\infty}f(x_{m} )\left(\cdots\int^{x_2}_{-\infty}f(x_1)\d x_1\cdots\right)\d x_m}\eq \frac{1}{m!}F(x_{m+1})^m[/math]
We substitute this back in to yield:
- [math]\frac{1}{m!}\int^t_{-\infty}f(x_{2m+1})\left(\int^{x_{2m+1} }_{-\infty}f(x_{2m})\left(\cdots\int^{x_{m+3} }_{-\infty}f(x_{m+2})\left(\int^{\Min{r,x_{m+2} } }_{-\infty} f(x_{m+1})F(x_{m+1})^m\d x_{m+1}\right)\d x_{m+2}\cdots\right)\d x_{2m}\right)\d x_{2m+1} [/math]
Conclusion of progression 1
We see here that
Progression: 2
This'll involve induction and dealing with the [ilmath]\text{Min}()[/ilmath] will be "tricky", both for practice and induction we will consider the special cases [ilmath]m\eq 1[/ilmath] and [ilmath]m\eq 2[/ilmath] by evaluating:
- [ilmath]m\eq 1[/ilmath] yields [math]I_1:\eq\frac{1}{1!}\int^t_{-\infty} f(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3[/math], by case analysis:
- if [ilmath]t\le r[/ilmath] then [ilmath]x_3\le t\le r[/ilmath] or [ilmath]x_3\le r[/ilmath] over the entire domain of interest, so [ilmath]\Min{r,x_3}\eq x_3[/ilmath] over the entire domain, giving:
- [math]I_1\eq\frac{1}{1!}\int^t_{-\infty}f(x_3)\left(\int^{x_3}_{-\infty}f(x_2)F(x_2)\d x_2\right)\d x_3[/math]
- We now use the corollary below to see:
- [math]I_1\eq\frac{1}{2!}\int^t_{-\infty}f(x_3)F(x_3)^2\d x_3[/math]
- [math]\eq\frac{1}{3!}F(t)^3[/math]
- [math]I_1\eq\frac{1}{2!}\int^t_{-\infty}f(x_3)F(x_3)^2\d x_3[/math]
- We now use the corollary below to see:
- [math]I_1\eq\frac{1}{1!}\int^t_{-\infty}f(x_3)\left(\int^{x_3}_{-\infty}f(x_2)F(x_2)\d x_2\right)\d x_3[/math]
- if [ilmath]t\ge r[/ilmath] then we split [ilmath](-\infty,t][/ilmath] into [ilmath](-\infty,r)[/ilmath] and [ilmath][r,t][/ilmath], giving:
- [math]I_1\eq\frac{1}{1!}\left[\int^r_{-\infty} f(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3+\int_r^tf(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3\right][/math]
- [math]\eq\frac{1}{1!}\left[\int^r_{-\infty}f(x_3)\left(\int^{x_3}_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3+\int_r^tf(x_3)\left(\int^r_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3\right][/math]
- We now use the required corollary immediately below to yield:
- [math]I_1\eq\frac{1}{1!}\left[\int^r_{-\infty}f(x_3)\cdot\frac{1}{2}F(x_3)^2\d x_3+\int_r^tf(x_3)\cdot\frac{1}{2}F(r)^2\d x_3\right][/math]
- [math]\eq\frac{1}{2!}\left[\frac{1}{3}F(r)^3+F(r)^2\int^t_rf(x_3)\d x_3\right][/math], note that: [math]\int^t_rf(x)\d x\eq\int_{-\infty}^tf(x)\d x-\int_{-\infty}^rf(x)\d x[/math] [math]\eq F(t)-F(r)[/math]
- [math]\eq\frac{1}{2!}F(r)^2\left[\frac{1}{3}F(r)+\big(F(t)-F(r)\big)\right][/math], note that: [math]F(t)-F(r)\eq\frac{3F(t)-3F(r)}{3} [/math] which we'll use next
- [math]\eq\frac{1}{2!}F(r)^2\left[\frac{3F(t)-2F(r)}{3}\right][/math]
- [math]\eq\frac{1}{3!}F(r)^2\big(3F(t)-2F(r)\big)[/math]
- [math]I_1\eq\frac{1}{1!}\left[\int^r_{-\infty} f(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3+\int_r^tf(x_3)\left(\int^{\Min{r,x_3} }_{-\infty}f(x_2)F(x_2) \d x_2\right)\d x_3\right][/math]
- if [ilmath]t\le r[/ilmath] then [ilmath]x_3\le t\le r[/ilmath] or [ilmath]x_3\le r[/ilmath] over the entire domain of interest, so [ilmath]\Min{r,x_3}\eq x_3[/ilmath] over the entire domain, giving:
It is clear that as [ilmath]t\rightarrow\infty[/ilmath] that we end up with [math]I_1\eq\frac{1}{3!}F(r)^2\big(3-2F(r)\big)[/math]
Thus: [math]\P{X_1\le X_2\le\Min{r,X_3}\le X_3}\eq\frac{1}{3!}F(r)^2\big(3-2F(r)\big)[/math]
Finally:
- [math]\Pcond{X_1\le X_2\le r}{X_1\le X_2\le X_3}\eq F(r)^2\big(3-2F(r)\big)[/math]
Required corollary
Recall from Probability of i.i.d random variables being in an order and not greater than something that:
- [math]\frac{1}{k!}\int^r_{-\infty}f(x)F(x)^k\d x\eq \frac{1}{(k+1)!}F(r)^{k+1} [/math]
So:
- [math]\int^r_{-\infty}f(x)F(x)^k\d x\eq \frac{1}{k+1}F(r)^{k+1} [/math]
By applying this to above (with the [ilmath]x_2[/ilmath] integrals):
- [math]\int^r_{-\infty}f(x)F(x)^1\d x\eq \frac{1}{2}F(r)^2 [/math], we then substitute this for the cases [ilmath]r:\eq r[/ilmath] and [ilmath]r:\eq x_3[/ilmath]
We'll then apply it to the [ilmath]x_3[/ilmath] integrals.
Conclusion of progression 2
- [math]\Pcond{X_1\le X_2\le r}{X_1\le X_2\le X_3}\eq F(r)^2\big(3-2F(r)\big)[/math]
Progression: 3
I am now looking at [ilmath]m\eq 3[/ilmath], which is 7 samples. To find this we evaluate:
- [math]\P{\text{Median}\le r}\eq\frac{7!}{3!}\lim_{t\rightarrow+\infty}\left(\int^t_{-\infty}f(x_7)\left(\int^{x_7}_{-\infty}f(x_6)\left(\int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\right)\d x_6\right)\d x_7\right)[/math]
Initial work:
- [math]I_1(x_6):\eq \int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\eq\left\{\begin{array}{lr}\frac{1}{5}\frac{1}{4}F(x_6)^5 && \text{if }x_6\le r\\\frac{1}{5}\frac{1}{4}F(r)^4\big(5F(x_6)-4F(r)\big) &&\text{if }x_6\ge r\end{array}\right.[/math] - these agree if [ilmath]x_6\eq r[/ilmath]
- [math]I_2(x_7):\eq \int^{x_7}_{-\infty}f(x_6)\left(\int^{x_6}_{-\infty}f(x_5)\left(\int^{\Min{r,x_5} }_{-\infty}f(x_4)F(x_4)^3 \d x_4\right)\d x_5\right)\d x_6\eq \int^{x_7}_{-\infty}f(x_6)I_1(x_6)\d x_6[/math] [math]\eq\frac{1}{6}\frac{1}{5}\frac{1}{4}\left\{\begin{array}{lr} F(x_7)^6 && \text{if }x_7\le r \\ F(r)^4\big(10F(r)^2-24F(r)F(x_7)+15F(x_7)^2\big) && \text{if }x_7\ge r\end{array}\right.[/math] - note both parts agree if [ilmath]r\eq x_7[/ilmath] as [ilmath]10+15-24\eq 1[/ilmath]
- [ilmath]I_3(t)\eq[/ilmath] (everything in the limit) [math]\eq \int^t_{-\infty} f(x_7)I_2(x_7)\d x_7[/math] [math]\eq\frac{1}{7}\frac{1}{6}\frac{1}{5}\frac{1}{4}\left\{\begin{array}{lr}F(t)^7 && \text{if }t\le r \\ F(r)^4\big(-20 F(r)^3 + 70F(r)^2 F(t)-84F(r)F(t)^2+35F(t)^3\big) && \text{if }t\ge r\end{array}\right.[/math] - note these agree if [ilmath]t\eq r[/ilmath]
- Clearly as [ilmath]t\rightarrow+\infty[/ilmath] we get [math]I_3(t)\rightarrow\frac{1}{7}\frac{1}{6}\frac{1}{5}\frac{1}{4} F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)[/math] as [ilmath]F(t)\rightarrow 1[/ilmath]
From the top of this section:
- [math]\P{\text{Median}\le r}\eq \frac{7!}{3!} I_3(+\infty)\eq F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)[/math]
Conclusion:
- [math]\P{\text{Median}\le r}\eq F(r)^4\big(-20F(r)^3+70F(r)^2-84F(r)+35\big)[/math]