# Distribution of the midrange in the general case

Given an iid sample $$X_1, \cdots, X_n$$ drawn from a sufficiently nice (finite expectation, maybe L2 integrable, etc.) distribution, I want I want to know the population CDF of the mid-range or center point

$$C(x) = \mathbb P \left[\frac {\max X_i+\min X_i}2 \leq 2x\right] = \mathbb P(\max X_i+\min X_i \leq 2x)$$

or at least some interesting facts and inequalities about it. This isn't a homework problem so nailing an answer for an exact question isn't important. Maybe this is easy with extra assumptions? I will obviously report the results of my continued research here for everyone to share.

These are my goals. Let me share my best work so far.

The density $$C'(x)$$ has to be the convolution of the densities for $$\min X_i, \max X_i$$ whose CDF is respectively $$m(x) = [\mathbb P(X

and for symmetric reasons

$$M(x) = [1-\mathbb P(X

What I have in my Batman utility belt is the Laplace transform. (Edit: as per comments below, I passed over the fact that $$\min X_i, \max X_i$$ are not independent r.v.s so the convolution method doesn't apply. Please refer to the nice accepted answer) It's nice because $$\mathcal L(M'(x)) = s\mathcal L(M)(s)$$ so

$$m'*M' = \mathcal L^{-1} \left\{[s\mathcal L(m)(s)] [s\mathcal L(M)(s)]\right\} = \mathcal L^{-1} \{ s^2 \left([\mathcal Lm](s) \cdot [\mathcal LM](s)\right)$$

and um, frantically going over the list of common facts about the Laplace transform, we see that

$$\mathcal L^{-1} \{s^2 [\mathcal Lf(s)] - f'(0) \} = f''(x)$$

which would be awesome if I was trying to inverse Laplace $$s^2(\mathcal Lm + \mathcal LM) = s^2 \mathcal (L+M)$$ rather than $$s^2[\mathcal L m]\cdot [\mathcal LM]$$. Which is close enough to be frustrating.

I'm at a loss by now. Am I even going in the right direction?

• You might want to look at the Wikipedia page on order statistics, and search questions here that contain the term – Glen_b -Reinstate Monica Mar 29 '19 at 16:21
• $X_{(1)}$ and $X_{(n)}$ are not independent random variables and so the density of their sum is not the convolution of their marginal densities. – Dilip Sarwate Mar 29 '19 at 16:22
• In the absolutely continuous case, there is a formula for the joint density of any pair of order statistics on Wikipedia – Artem Mavrin Mar 29 '19 at 16:27
• I jumped too fast to the convolution approach. I have to edit the post later to see what's salvageable. – user8948 Mar 29 '19 at 17:03
• There seem to be too many "2"s in your displayed equation. // Also, several math stat books on my shelf show how to find the distribution of the range (max - min), and getting the dist'n of the midrange ought to be similar. // I know of no way to invert a Laplace transform (moment-generating function), but there is an inversion formula for characteristic functions. – BruceET Mar 29 '19 at 18:40

As currently stated, the equation at the top of the question appears to have an extra (or missing) $$2$$ somewhere, so I will tackle the probability $$P\left(\min_i X_i + \max_i X_i \leq a\right)$$ for an arbitrary $$a \in \mathbb{R}$$ that you can scale as needed for your context.
Proposition 1. Let $$X_1, \ldots, X_n$$ be an i.i.d. sample from an absolutely continuous distribution with probability density $$f$$ and cumulative distribution function $$F$$. Let $$X_{(1)} = \min_i X_i$$ and $$X_{(n)} = \max_i X_i$$. Then the joint density of $$(X_{(1)}, X_{(n)})$$, call it $$g$$, is given by $$g(x, y) = n (n - 1) \left(F(y) - F(x)\right)^{n - 2} f(x) f(y)$$ for all $$(x, y) \in \mathbb{R}^2$$ with $$x \leq y$$ ($$g(x, y) = 0$$ otherwise).
Proof. We first compute $$P(X_{(1)} \geq x, X_{(n)} \leq y)$$ for all $$x, y \in \mathbb{R}$$. This probability is clearly zero if $$x > y$$, so assume $$x \leq y$$. Notice that $$\{X_{(1)} \geq x\} = \{X_1 \geq x, \ldots, X_n \geq x\}$$ and $$\{X_{(n)} \leq y\} = \{X_1 \leq y, \ldots, X_n \leq y\},$$ whence \begin{aligned} P(X_{(1)} \geq x, X_{(n)} \leq y) &= P(x \leq X_1 \leq y, \ldots, x \leq X_n \leq y) \\ &= P(x \leq X_1 \leq y) \cdots P(x \leq X_n \leq y) \\ &= \left(F(y) - F(x)\right)^n. \end{aligned} Here we used the independence and identically-distributed-ness of $$X_1, \ldots, X_n$$ and the fact that their distributions are absolutely continuous. To summarize, $$P(X_{(1)} \geq x, X_{(n)} \leq y) = \begin{cases} \left(F(y) - F(x)\right)^n & \text{if x \leq y} \\ 0 & \text{otherwise.} \end{cases}$$
The joint density of $$(X_{(1)}, X_{(n)})$$ is now obtained by differentiating: $$g(x, y) = -\frac{\partial^2}{\partial x \partial y} P(X_{(1)} \geq x, X_{(n)} \leq y)$$ for a.e. $$(x, y) \in \mathbb{R}^2$$. When $$x > y$$, both sides are zero, and when $$x \leq y$$, then a.e. we have \begin{aligned} g(x, y) &= -\frac{\partial^2}{\partial x \partial y} P(X_{(1)} \geq x, X_{(n)} \leq y) \\ &= -\frac{\partial^2}{\partial x \partial y} \left(F(y) - F(x)\right)^n \\ &= n (n - 1) \left(F(y) - F(x)\right)^{n - 2} f(x) f(y), \end{aligned} as claimed.
Proposition 2. With the same assumptions and notation as in Proposition 1, we have $$P(X_{(1)} + X_{(n)} \leq a) = n (n - 1) \int_{-\infty}^{a / 2} f(x) \left(\int_x^{a - x} \left(F(y) - F(x)\right)^{n - 2} f(y) \, dy\right) \, dx.$$
Proof. We have \begin{aligned} P(X_{(1)} + X_{(n)} \leq a) &= \int_{-\infty}^\infty \int_{-\infty}^{a - x} g(x, y) \, dy \, dx \end{aligned} Since $$g(x, y) = 0$$ if $$x > y$$, this integral reduces to $$\int_{-\infty}^{a/2} \int_x^{a - x} g(x, y) \, dy \, dx$$ (draw the picture of the intersection of the regions $$x \leq y$$ and $$x + y \leq a$$ to see why). Now just plug in the density formula from Proposition 1.