I am trying to solve the following exercise:
Let $X_1,\dots,X_n$ be iid continuous random variables with density function given by $f(x)$. Let $M$ be the median of the $X's$ distributions, that means, $P(X_i \leq M)=\dfrac{1}{2}$ for all $i$.
a) Show that $P(\max X_i< M \cup \min X_i > M)=\dfrac{1}{2^{n-1}}$.
b) Deduce that $(\min X_i, \max X_i)$ is a confidence interval for $M$ of level $1-\dfrac{1}{2^{n-1}}$.
This is what I could do:
Using the fact that given two events $A,B$, $P(A \cup B)=P(A)+P(B)-P(A \cap B)$, we have $$P(\max X_i< M \cup \min X_i > M)=P(\max X_i < M)+P(\min X_i > M)+P(\max X_i < M \cap \min X_i >M)\\ =P(X_1<M,...,X_n<M)+P(X_1>M,...,X_n>M)+0\\ =\dfrac{1}{2^n}+\dfrac{1}{2^n}=\dfrac{1}{2^{n-1}}.$$
I am completely stuck in b), I don't know what to do to deduce b) from a). I would appreciate some help. Thanks in advance.