How to find MLE of variance

840 Views Asked by At

How do I find the Maximum Likelihood Estimation for the variance of the uniform population distribution? Where X is a simple random sample between 0 and θ.

\begin{align} Given:V(X) = \frac{θ^2}{12} \end{align}

Thanks in advance.

1

There are 1 best solutions below

3
On

If you have observations $X_1, \dots, X_n,$ the MLE for $\theta$ in $UNIF(0, \theta)$ is the maximum observation. Because you have only one observation $X,$ it is the MLE (see below). And the MLE itself is dreadfully biased; $E(X) = \theta/2.$ But an unbiased estimate of $\theta$ based on the MLE is $\tilde \theta = 2X.$

The MLE of the variance is $X^2/12.$ (Invariance principle for MLEs.) And, once you have your unbiased estimate $\tilde \theta$ of $\theta,$ you might try using $\tilde \theta^2/12$ to estimate the variance. However, both $\hat\theta^2/12$ and $\tilde \theta^2/12$ are biased estimates of the variance. (It isn't part of your problem, but maybe you can find an unbiased estimate of the variance based on the MLE $X$ of $\theta$.)

Let's look at a simulation in R of a million performances of the one-observation experiment. Suppose $\theta = 10.$ On average, how well can we estimate $\theta?$ And how about the variance, $\theta^2/12?$
Although one can't expect much from any one experiment with only one observation, because there is high variability, the average behavior of the unbiased estimate based on the MLE is not bad. Neither the MLE $\hat \theta^2/12$ of the variance nor its alternative estimate $\tilde \theta^2/12$ is unbiased. [$E(\tilde \theta^2/12)$ ia illustrated.]

I don't know how familiar you are with simulations or with R, so this may be a waste of your time, but take a look and see if the comments (at #s) make any sense.

 m = 10^6;  th = 10;  x = runif(m, 0, th)
 MLE = mean(x); UNB = 2*MLE;  MLE; UNB
 ## 5.000518  # Aprx E(X) = E(MLE),  close to theta/2
 ## 10.00104  # Aprx E(unbiased est), close to theta
 mean((2*x)^2/12);  th^2/12
 ## 11.10941   # Aprx E(alt est of var). Too big, biased.
 ## 8.333333   # Exact value of var

Finally, why do I say the $X$ is the MLE of $\theta$?. Because the pdf (or likelihood function) of $UNIF(0, \theta)$ is discontinuous, you can't use differentiation to find the MLE. Suppose you observe $X = 5.3.$ Then here is a plot of the likelihood function. It is clear that the maximum is at 5.3.

th = seq(0, 15, by=.001);  LIKE = dunif(5.3, 0, th)
plot(th, LIKE, type="l")

enter image description here