# Consistent MLE of a U(0, θ)

#### calculuskid1

##### New Member
So the question is:
Let X1,.., Xn ∼ U(0, θ). Show that the MLE is consistent.
Hint: Let Y=max {X1,... ,Xn}, for any c, P(Y <c)=P(X1 <c,X2 <c,...,Xn <c)=P(X1 <c)P(X2 < c)...P(Xn < c).
So I know for the MLE to be consistent, the estimated value of theta has to converge (in probability) to the actual value.
Im trying to think of how this hint given can lead me to the result.

#### Dason

The hint is quite good. If you don't see how that helps then try plugging in some values - ie set a value for c, assume n = 2 and calculate P(Y < c). Now give it a try for n = 3, n = 4, ... you should something happening and hopefully you can figure out why it is happening.

#### calculuskid1

##### New Member
So because its a uniform distributions won't all the P($$X_{i}$$<c)=c/θ?
So P(Y<c)=(c/θ)^n?

#### Dason

Yes. And what happens to that as n gets large?

#### calculuskid1

##### New Member
Well, it goes to zero, but how does that show that the MLE is consistent?

#### Dason

What do you need to be true for the MLE to be consistent? You wrote out the condition in the first post but write out mathematically what you need to be true for us.

#### calculuskid1

##### New Member
Well I said that the Estimator has to converge to the actual value, which we found is zero.
So if MLE is $$\hat\theta$$=max($$X_{1}$$+...+$$X_{n}$$) this has to converge to 0 in probability.
Which we just showed using the hint?

#### Dason

Well I said that the Estimator has to converge to the actual value, which we found is zero.
0? You sure about that? What we showed is that for any $$c < \theta$$ that $$\lim_{n \rightarrow \infty}P(Y_n < c) = 0$$.

Do you really think the max of your sample should converge to 0?

And I was asking you to write out mathematically what it is that we need to show to say that a random variable converges in probability.

#### calculuskid1

##### New Member
Well obviously it does not make sense for the max to converge to zero...
So we have to show that:
lim P(|$$\theta$$ - $$\hat\theta$$| >= $$\epsilon$$) = 0
?

#### calculuskid1

##### New Member
I am looking at examples online and it seems like they are all taking the expected value of the difference of the two.
So E($$\hat\theta$$ - $$\theta$$)$$^2$$=2$$\theta^2$$/(n+1)(n+2)

And this obviously goes to 0 and n is large but Im not sure where the (n+1)(n+2) comes from

#### Dason

Notice that $$\hat{\theta} = Y$$ and that we can rewrite $$|\theta - Y| \geq \epsilon$$ as $$Y \leq \theta - \epsilon$$ (using the fact that $$Y \leq \theta$$)
Yes I see, basically let c=$$\theta$$ - $$\epsilon$$ and the rest we have done lol