# Expected value of MLE of uniform distribution [closed]

Let $X_1,\dots,X_n$ be a simple random sample from $U(0,\theta)$. Let $\hat\theta=X_{(n)}$ be the MLE estimator. How can I find the expected value of $\hat \theta$ and prove that is it consistency? Any hint will be apprecied.

Edit

Based on your answer I will say that the CDF is

$$F_X(x)=\mathbb{P}\left( X_{(n)} \leq x \right)=\left(\frac{x}{\theta}\right)^n$$

and the density is$$f_X(x)=\frac{1}{\theta^n} nx^{n-1}$$

Now I can find the expected value:

$$\mathbb{E}(\hat\theta)=\int_0^\theta \frac{1}{\theta^n} nx^{n-1}\cdot x\,dx=\frac{1}{\theta^n}\frac{n}{n+1}x^{n+1}\Big|_0^\theta=\frac{n}{n+1}\theta$$

A sufficient condition for consistency is $\lim_{n \to \infty}\mathbb{E}(\hat \theta)=\theta$ and $\lim_{n \to \infty}\mathbb{Var}(\hat \theta)=0$, so I have to find $\mathbb{Var}(\hat \theta)=\mathbb{E}(X^2)-(\mathbb{E}(X))^2$.

$$\mathbb{E}(X^2)=\frac{1}{\theta^n}\frac{n}{n+2}x^{n+2}\Big|_0^\theta=\frac{n}{n+2}\theta^2$$

and finally

$$\lim_{n \to \infty}\mathbb{Var}(\hat \theta)=\lim_{n \to \infty}\left(\frac{n}{n+2}\theta^2-(\frac{n}{n+1}\theta)^2\right)=\theta^2-\theta^2=0$$

## closed as off-topic by Tim♦, Sycorax, Silverfish, Nick Cox, JohnJul 9 '16 at 20:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Self-study questions (including textbook exercises, old exam papers, and homework) that seek to understand the concepts are welcome, but those that demand a solution need to indicate clearly at what step help or advice are needed. For help writing a good self-study question, please visit the meta pages." – Tim, Sycorax, Silverfish, Nick Cox, John
If this question can be reworded to fit the rules in the help center, please edit the question.

• Thank you for adding the [self-study] tag. Please be sure to read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. – gung Jul 9 '16 at 16:09

## 2 Answers

The answer is

$$\theta \cdot \frac{ n } {n + 1}$$

This follows from the fact that the order statistics from a uniform(0,1) follow a beta distribution (and the max is the $n$'th order statistic), and uniform(0,$\theta$) is just a scaled version of a uniform(0,1).

• Check out our policy for self-study questions - we prefer to give out hints to help someone get unstuck, rather than complete solutions. – Silverfish Jul 9 '16 at 16:51
• @Silverfish got it! – Paul Jul 9 '16 at 16:54
• What's the point of the internet, if not for complete solutions? Not everyone needs to reinvent the wheel. People should have access to whatever information they need. It's their responsibility to utilize it or not. – Dave Liu Nov 27 '18 at 23:10

You can use the distribution of the maximum of iid random variables from a continuous distribution, recall that the events $\left\{ X_{(n)} \leq x \right\}$ and $\left\{ X_1 \leq x, X_2 \leq x, \ldots, X_n \leq x \right\}$ are equivalent. Then, compute the expected value of this random variable and show that the bias and its variance go to zero in the limit, so that there is convergence in quadratic mean, hence also in probability.