TITLE: probability density of the maximum of samples from a uniform distribution
QUESTION [34 upvotes]: Suppose
$$X_1, X_2, \dots, X_n\sim Unif(0, \theta), iid$$
and suppose
$$\hat\theta = \max\{X_1, X_2, \dots, X_n\}$$
How would I find the probability density of $\hat\theta$?
Thank you!

REPLY [2 votes]: The general formula for the probability density of the maximum of any $iid$ sample set of the random variable $x$, $M = max\{x_1,x_2,…,x_n\}$ is: $$f_M(M = x) = n * F_x(x)^{n-1} * f_x(x)$$ where $f_x(x)$ is the probability density of $x$, and $F_x(x)$ is the cumulative distribution function of same.
In this case we have: $f_x(x) = \frac{1}{\theta}$ , $F_x(x) = \frac{x}{\theta}$,  so we get:
 $$f_M(M = x) = n * (\frac{x}{\theta})^{n-1} * \frac{1}{\theta}$$
$$= \frac{n * x^{n-1}}{\theta^n}$$