# Probability of Median from a continuous distribution

For a sample of size $n=3$ from a continuous probability distribution, what is $P(X_{(1)}<k<X_{(2)})$ where $k$ is the median of the distribution? What is $P(X_{(1)}<k<X_{(3)})$? $X_{(i)},i=1,2,3$ are the ordered values of the sample.

I'm having trouble trying to solve this question since the median is for the distribution and not the sample. The only explicit formulas for the median I know of are the median $k$ of any random variable $X$ satisfies $P(X≤k)≥1/2$ and $P(X≥k)≥1/2$, but I don't see how to apply that here.

-

I assume $X_1, X_2, X_3$ are taken to be iid. Here's a hint:
$$P(X_{(1)} < k < X_{(2)}) = 3P(X_1 < k \cap X_2 > k \cap X_3 > k)$$ by a simple combinatoric argument. Do you see why? Since the distributions are continuous, $$P(X_1 > k) = P(X_1 \ge k) = P(X_1 < k) = P(X_1 \le k) = \frac 1 2.$$ The second part of the question is similar.
This is also the probability of exactly one success in three trials, with probability $1/2$ of success on each trial. Hence $\binom{3}{1} \left(\frac12\right)^3 = \frac38$.