Probability that a given number falls between the minimum and the maximum of a sample Let $X$ be a real random variable with absolutely continuous cumulative distribution function $F$. Let $x_{(1)}, ..., x_{(n)}$ be a i.i.d. ordered sample of size $n$ of $X$:
$$
x_{(1)} \leq x_{(2)} \leq ... \leq x_{(n)}.
$$
I am interested by the interval $[x_{(1)}, x_{(n)}]$ defined by the sample minimum and maximum. Let $x \in \mathbb{R}$ be a given arbitrary, constant, number. I want to compute the probability that $x$ falls in the random interval between the minimum and the maximum:
$$
\mathbb{P}\left(X_{(1)} \leq x \leq X_{(n)} \right).
$$
From this post, I can see that:
$$
\mathbb{P}(X_{(1)} \leq x, X_{(n)} \leq y)
= [F(y)]^n - [F(y) - F(x)]^n
$$
for any $x < y$. But this does not finish the proof.

The probability is
$$
\mathbb{P} \left(X_{(1)} \leq x \leq X_{(n)}\right)
= 1 - [1 - F(x)]^n - [F(x)]^n.  \qquad (1)
$$
More generally, given any $x$ and $y$ such that $x \leq y$, we have
$$
\mathbb{P} \left(X_{(1)} \leq x \; \textrm{ and } \; X_{(n)} > y\right)
= 1 - [1 - F(x)]^n - [F(y)]^n + [F(y) - F(x)]^n.  
$$
In order to get the previous result, we just have to plug $x = y$ into the equation (1).
To see the more general result, we use the fact that :
$$
\begin{aligned}
& \mathbb{P} \left(X_{(1)} \leq x \; \textrm{ and } \;  X_{(n)} > y\right) \\
& = \mathbb{P} \left(X_{(1)} \leq x \right)
- \mathbb{P} \left(X_{(1)} \leq x \; \textrm{ and } \;  X_{(n)} \leq y\right). \qquad (2)
\end{aligned}
$$
Moreover, the cumulative distribution function of the smallest observation is:
$$
\mathbb{P} \left(X_{(1)} \leq x \right)
= 1 - [1 - F(x)]^n. 
$$
Finally, we substitute the equation
$$
\mathbb{P} \left(X_{(1)} \leq x \; \textrm{ and } \; X_{(n)} \leq y\right) 
= [F(y)]^n - [F(y) - F(x)]^n 
$$
in the equation (2) and get the result.
