# Finding probabilities of $X_{(N)}$ (order statistics)

Draw N samples from unif(a,b) and consider the largest realization $X_{(N)}$. What's the probability that this value falls within a certain subset of (a, b)? What expression has to be integrated (what's the p.d.f. of $X_{(N)}$)?

-

For ease of typing, let $Y$ be the maximum. Then $Y\le y$ if and only if all the $X_i$ are $\le y$.
For $y$ between $a$ and $b$, this is $$\left(\frac{y-a}{b-a}\right)^N.$$ This gives us the cumulative distribution function of $Y$. If we want to be fussy, the cdf $F_Y(y)$ is $0$ for $y\lt a$, is given by the above expression for $a\le y\le b$, and is $1$ for $y\gt b$.
Remark: The cumulative distribution function of the minimum is also given by a simple expression. Indeed one can find without too much trouble the distribution of the $k$-th order statistic for any $k$ between $1$ and $N$.