I recently learned that to find the pdf of the median of say $X_1,X_2, X_3$, you first find the Cdf via $ P(M \le x) =P(\text{at least 2 are}\, \le x) = P( \text{exactly 2 are}\, \le x) + P(\text{all 3 are} \le x)$ where $M$ denotes the median. Finaly you differentiate to get the required pdf.
My questions:
- How does one find the cdf/pdf of an arbitrary number of order statistics?
- Is there a generalized formula?
Thanks
Edit:
Let's suppose the $X_i$'s are iid.