Probability Density Function – Calculating Maximum of IID Uniform Samples

density functionextreme value

Given the random variable

$$Y = \max(X_1, X_2, \ldots, X_n)$$

where $X_i$ are IID uniform variables, how do I calculate the PDF of $Y$?

Best Answer

It is possible that this question is homework but I felt this classical elementary probability question was still lacking a complete answer after several months, so I'll give one here.

From the problem statement, we want the distribution of

$$Y = \max \{ X_1, ..., X_n \}$$

where $X_1, ..., X_n$ are iid ${\rm Uniform}(a,b)$. We know that $Y < x$ if and only if every element of the sample is less than $x$. Then this, as indicated in @varty's hint, combined with the fact that the $X_i$'s are independent, allows us to deduce

$$ P(Y \leq x) = P(X_1 \leq x, ..., X_n \leq x) = \prod_{i=1}^{n} P(X_i \leq x) = F_{X}(x)^n$$

where $F_{X}(x)$ is the CDF of the uniform distribution that is $\frac{y-a}{b-a}$. Therefore the CDF of $Y$ is $$F_{Y}(y) = P(Y \leq y) = \begin{cases} 0 & y \leq a \\ \phantom{} \left( \frac{y-a}{b-a} \right)^n & y\in(a,b) \\ 1 & y \geq b \\ \end{cases}$$

Since $Y$ has an absolutely continuous distribution we can derive its density by differentiating the CDF. Therefore the density of $Y$ is

$$ p_{Y}(y) = \frac{n(y-a)^{n-1}}{(b-a)^{n}}$$

In the special case where $a=0,b=1$, we have that $p_{Y}(y)=ny^{n-1}$, which is the density of a Beta distribution with $\alpha=n$ and $\beta=1$, since ${\rm Beta}(n,1) = \frac{\Gamma(n+1)}{\Gamma(n)\Gamma(1)}=\frac{n!}{(n-1)!} = n$.

As a note, the sequence you get if you were to sort your sample in increasing order - $X_{(1)}, ..., X_{(n)}$ - are called the order statistics. A generalization of this answer is that all order statistics of a ${\rm Uniform}(0,1)$ distributed sample have a Beta distribution, as noted in @bnaul's answer.