TITLE: Unbiased Estimator for a Uniform Variable Support
QUESTION [26 upvotes]: Let $ x_i $ be iid observations in a sample from a uniform distribution over $ \left[ 0, \theta \right] $.  Now I need to estimate $ \theta $ based on $N$ observations and I want the estimator to be unbiased.
I thought about simple estimator $ \hat{\theta} = \max \left( x_i \right) $.
Based on simulation it is not biased, yet I couldn't show it analytically.
Could anyone, please, show it is unbiased?
BTW, I could easily find another, easy to prove, unbiased estimator, $ \hat{\theta} = 2 \mathrm{mean} \left( {x}_{i} \right) $

REPLY [5 votes]: It may be worth noticing a couple of things about the other unbiased estimator mentioned in the question: $2\times\text{the sample mean}$.
(1) If one finds the conditional expected value of $2\times\text{the sample mean}$ given the sample maximum, one gets $(N+1)/N$ times the sample maximum.
(2) In some cases, $2\times\text{the sample mean}$ is actually smaller than the sample maximum.  Thus although it is on average the right amount, there are instances where the data themselves tell you that it's nowhere near the right amount.