Solution (source code)

= Solution

Put $Q(u)=\inf\{x\in\mathbb R:F(x)\geq u\}$ for $0<u<1$. This is the <quantile function>, rather than an ordinary inverse requiring strict increase. The limits of the <distribution function> at infinity make $Q(u)$ finite, and the fact that $F$ is a <right-continuous function> ensures $F(Q(u))\geq u$. Consequently
$$
Q(u)\leq x\quad\Longleftrightarrow\quad u\leq F(x).
$$
Increasing $u$ shrinks the set in the <infimum>, so the <quantile function> is a <monotone function>. To prove the <left continuity of the quantile function>, fix $u$ and let $L=\sup_{v<u}Q(v)\leq Q(u)$. If $L<Q(u)$, choose $L<y<Q(u)$. Then $F(y)<u$, so some $v\in(F(y),u)$ satisfies $Q(v)>y$, a contradiction. Thus \b[$Q(v)\uparrow Q(u)$ as $v\uparrow u$]. At a flat stretch of the <distribution function>, the <quantile function> may jump immediately to the right, consistent with this left-continuous convention.

For the <uniform order statistic>, count the observations at most $u$. That count has the <binomial distribution> with parameters $n,u$, giving
$$
\mathbb P\{U_{(j)}\leq u\}=\sum_{r=j}^n\binom nr u^r(1-u)^{n-r},\qquad 0<u<1.
$$
Differentiating makes adjacent terms telescope: use $r\binom nr=n\binom{n-1}{r-1}$ and $(n-r)\binom nr=n\binom{n-1}{r}$. The <probability density function> is therefore
$$
\boxed{g_j(u)=\frac{n!}{(j-1)!(n-j)!}u^{j-1}(1-u)^{n-j}\mathbf1_{\{0<u<1\}}.}
$$
In particular, $U_{(j)}$ has the <Beta distribution> with parameters $j,n-j+1$.

Write $m=Q(1/2)$ for the specified <median>. <Continuity> of the <distribution function> gives $F(m)=1/2$ and no mass at $m$, even if the <distribution function> has a flat stretch there. Thus $B=\sum_i\mathbf1_{\{X_i<m\}}$ has the <binomial distribution> with parameters $n,1/2$. Except on a null event, the <order-statistic confidence interval for a median> covers $m$ exactly when $j\leq B\leq n-j$. Symmetry of the <binomial distribution> makes its two failure probabilities equal. Alternatively, the <probability integral transform> gives
$$
\mathbb P\{B\geq n-j+1\}
=\mathbb P\{U_{(n-j+1)}\leq1/2\}
=n\binom{n-1}{j-1}\int_0^{1/2}u^{n-j}(1-u)^{j-1}\,du.
$$
Hence \b[the coverage is exactly $1-\alpha$], with
$$
\boxed{\alpha=2n\binom{n-1}{j-1}\int_0^{1/2}u^{n-j}(1-u)^{j-1}\,du
=2\sum_{r=0}^{j-1}\binom nr2^{-n}.}
$$
The asymmetric open/closed endpoint convention does not change the coverage because the <continuous probability distribution> assigns no mass to the <median>.