# PDF of the largest observation in a sample [duplicate]

Intro

Let $P(X=x)$ be a Probability Density Function (PDF). Assume we were to perform $n$ observations from a population that is distributed according to $P(X=x)$ (sample size = $n$). I would expect the largest observation in my sample of size $n$ to be larger than the median (as long as $n>1$).

Question

What is the PDF of the largest observation given the PDF of the population ($P(X=x)$) and the sample size ($n$)?

Note

I am interested in how performing this kind of calculation. I am therefore not suggesting any specific PDF for the population. I welcome those who want to answer to remain general and not chose any specific PDF and/or make an example of such calculation by choosing a given pdf.