# Probability Distribution Function for largest of $n$ uniformly random variables.

Generate $n$ random real numbers, from the uniform distribution on $[0,1]\in \Bbb{R}$. Let the largest such number be $X$. What is the probability distribution function of $X$??

I can plot historgrams in Mathematica which suggest there is a simple power law (i.e. $f(X=x) = n x^{n-1}$ but I don't know how to prove this and would really appreciate some help!

$P(X\le x)=x^n$ (each of the $n$ random numbers must be less than or equal to $x$). This gives you the cdf of $X$. From there you can get the pdf.

• OK. I think I get it. Thanks for explaining! – amcalde Dec 9 '14 at 21:50

Let $\left(x_i\right)_{i=1}^n$ be the sequence of $n$ random numbers generated and $\left(X_i\right)_{i=1}^n$ the iid random variables that generated them. For this problem, it is easier to look at $\mathbb{P}\left(X<x\right)$ for some $x\in\mathbb{R}$.

If we want to find $\mathbb{P}\left(X<x\right)$, $x\in\left(0,1\right)$ then we have the following: \begin{align*} \mathbb{P}\left(X<x\right) &= \mathbb{P}\left(X_1<x\cap\dotsb\cap X_n<x\right) \\ \text{due to independence}\qquad &= \prod_{i=1}^n\mathbb{P}\left(X_i<x\right) \\ \text{due to identical distribution}\qquad &= \prod_{i=1}^n\mathbb{P}\left(X<x\right) \\ \text{as each $X_i$ is uniform on $\left[0,1\right]$}\qquad &= x^n \\ \end{align*}

When $x\in\left(-\infty,0\right]$, $\mathbb{P}\left(X<x\right)=0$ as the maximum of the randomly generated numbers will always be greater than $0$. When we have $x\in\left[1,\infty\right)$, $\mathbb{P}\left(X<x\right)=1$ as the maximum of the randomly generated numbers will always be less than $1$.

So we have $$\mathbb{P}\left(X<x\right)= \begin{cases} 0, & x\in\left(-\infty,0\right] \\ x^n, & x\in\left(0,1\right) \\ 1, & x\in\left[1,\infty\right) \end{cases}$$

Differentiating this with respect to $x$ we obtain that $$\mathbb{P}\left(X=x\right)= \begin{cases} 0, & x\in\left(-\infty,0\right] \\ nx^{n-1}, & x\in\left(0,1\right) \\ 0, & x\in\left[1,\infty\right) \end{cases}.$$