[Math] Density function of ordered statistic of a uniform distribution from $0

order-statisticsprobabilityprobability distributions

Assume $X_1, X_2, …, X_n$ is a random sample of a uniform random variable $X$ on the interval $(0,\theta)$. What is the density function for $X$ and the density function for $X_{(n)}$ where $X_{(n)}$ is the $n$-th ordered statistic of $X$.

So, it's pretty trivial that $f_X(x) = \dfrac{1}{\theta}$.
I also know that the density function for an ordered statistic of a uniform random variable on interval $0<x<1$ follows a beta distribution:
$$f_{X_r}(x) = \dfrac{\Gamma{(n+1)}}{\Gamma{(r)}\Gamma{(n-r+1)}}x^{r-1}(1-x)^{n-r}.$$
So, considering that I want to know the the density function for the interval $0<x<\theta$, I feel like I could just divide through by $\theta$ to make the interval $0<\frac{x}{\theta}<1$, and then (considering that I want the density function for the n'th ordered statistic), the distribution function would become:
$$f_{X_{(n)}}{(x)} = n\left(\dfrac{x}{\theta}\right)^{n-1}$$

However, the text I am following along with reports that this value is:
$$f_{X_{(n)}}{(x)} = n\dfrac{x^{n-1}}{\theta^n}.$$

Can anyone help me figure out what I'm missing here?
Thanks!

Best Answer

There are several ways to remedy the issue. The simplest is to recognize that you are performing a linear transformation and hence $$f_{X_{(n)}}(x) = \frac{f_{U(n)}(x/\theta)}{\left|\frac{du}{dx}\right|_{u = x/\theta}} = \frac{1}{\theta}\cdot\frac{\Gamma(n,1)}{\Gamma(n)\Gamma(1)}(x/\theta)^{n-1}(1-x/\theta)^{1-1} = n\cdot\frac{x^{n-1}}{\theta^n}$$ which gives the desired result.

You could also calculate the cdf $$P(X_{(n)}\leq x) = \left(\frac{x}{\theta}\right)^n.$$ This gives that the pdf is $$f_{X_{(n)}}(x) = n\cdot\left(\frac{x}{\theta}\right)^{n-1}\cdot\frac{1}{\theta} = n\cdot\frac{x^{n-1}}{\theta^n}.$$