Probability that $\max(X_1, \ldots, X_n) - \min(X_1, \ldots, X_n) \leq 0.5$

345 Views Asked by At

Consider $n$ IID random variables $X_1, \ldots, X_n \sim U(0,1)$. What is the probability that $\max(X_1, \ldots, X_n) - \min(X_1, \ldots, X_n) \leq 0.5$.

Denote $Z_1, Z_n$ as the min and max respectively. Then by symmetry, I believe $E[Z_1] = 1 - E[Z_n]$. I am unsure how to find $P(Z_n - Z_1 \leq 0.5)$. I think I can find the distribution for $P(Z_n), P(Z_1)$ individually, how how do I go about finding the distribution of the difference between the 2?

3

There are 3 best solutions below

4
On

I think you're coming at this from a slightly wrong direction; importantly, $Z_1$ and $Z_n$ aren't independent so knowing their individual distributions doesn't help you. For instance, in the $n=2$ case, $Z_1\geq \frac12$ with probability $\frac14$ and with the same probability $Z_2\leq \frac12$, but these two events can never happen simultaneously.

Instead, suppose that $Z_1=z$. Then all of the other $X_i$ are equidistributed in $[z, 1]$ (why?). So your probability for this value of $Z_1$ is simply $\displaystyle\prod_{i, X_i\neq Z_1} P\left(X_i \leq \min(1, z+0.5) | z\leq X_i\right)$. And since the $X_i$ are independent, this is just $\displaystyle\left(P\left(X_i \leq \min(1, z+0.5) | z\leq X_i\right)\right)^{n-1}$. Then you'll have to integrate this over the distribution of $Z_1$ (which you should be able to find with a sort of symmetry argument.)

6
On

Let $A = 1-\min(X_1,\ldots,X_n)$ and $B = \max(X_1,\ldots,X_n)$. The joint CDF of $A,B$ is given by:

\begin{align*} F(a,b) &= P\{A \le a, B \le b\} \\ &= P\{\min(X_1,\ldots,X_n) \ge 1-a \ \text{and} \ \max(X_1,\ldots,X_n) \le b\} \\ &= P\{1-a \le X_k \le b \ \text{for} \ k = 1,\ldots,n\} \\ &= \prod_{k = 1}^{n}P\{1-a \le X_k \le b\} \\ &= \prod_{k = 1}^{n}(b-(1-a))I(b \ge 1-a) \\ &= (b-(1-a))^nI(b \ge 1-a) \end{align*}

for $0 \le a,b \le 1$.

The joint PDF of $A,B$ can be found by computing $f(a,b) = \dfrac{\partial^2F}{\partial a \partial b}(a,b)$, and then you can compute $P\{\max(X_1,\ldots,X_n)-\min(X_1,\ldots,X_n) \le \tfrac{1}{2}\} = P\{B-(1-A) \le \tfrac{1}{2}\}$ by integrating $f(a,b)$ over the appropriate subset of $[0,1] \times [0,1]$.

0
On

Let $Z_n$ equal the maximum, and $Z_1$ the minimum of ${\{X_k\}}_{k\in\{1..n\}}$, which is a sample of $n$ iid random variables with probability density function $f_{\small X}(x)$ and cummulative distribution function $F_{\small X}(x)$.

$$\begin{align}f_{\small X}(x)&=\mathbf 1_{x\in(0..1)}\\[2ex]F_{\small X}(x)&=x\mathbf 1_{x\in(0..1)}+\mathbf 1_{x\in[1..\infty)}\end{align}$$

Then we find

$$\begin{align}f_{\small Z_1,Z_n}(s,t) &= \dfrac{n!}{\,1!\,(n-2)!\,1!\,} f_{\small X}(s)\bigl(F_{\small X}(t)-F_{\small X}(s)\bigr)^{n-2}f_{\small X}(t)\mathbf 1_{0\leq s\leq t\leq 1}\\[1ex]&=n(n-1)(t-s)^{n-1}\mathbf 1_{0\leq s\leq t\leq 1}\\[2ex]f_{\small (Z_n-Z_1)}(z)&=\int_0^{1-z} f_{\small Z_1,Z_2}(s,s+z)~\mathrm ds\\[2ex]F_{\small (Z_n-Z_1)}(z)&=\int_0^z f_{\small (Z_n-Z_1)}(u)~\mathrm d u\\[1ex]&= n(n-1)\int_0^{z}\int_0^{1-u} u^{n-1}~\mathrm d s~\mathrm d u\end{align}$$

$\mathsf P(Z_n-Z_1\leqslant 0.5)=F_{\small (Z_n-Z_1)}(0.5)$ of course.   It comes out to a rather tidy expression. $\phantom{F_{\small (Z_n-Z_1)}(0.5)=(n+1)0.5^{n}}$