Is there an example where MLE produces a biased estimate of the mean? - Cross Validated most recent 30 from stats.stackexchange.com 2019-10-22T01:21:19Z https://stats.stackexchange.com/feeds/question/252129 https://creativecommons.org/licenses/by-sa/4.0/rdf https://stats.stackexchange.com/q/252129 17 Is there an example where MLE produces a biased estimate of the mean? Cagdas Ozgenc https://stats.stackexchange.com/users/20980 2016-12-17T19:33:01Z 2018-11-16T02:42:43Z <p>Can you provide an example of an MLE estimator of the mean that is biased?</p> <p>I am not looking for an example that breaks MLE estimators in general by violating regularity conditions.</p> <p>All examples I can see on the internet refer to the variance, and I can't seem to find anything related to the mean.</p> <p><strong>EDIT</strong></p> <p>@MichaelHardy provided an example where we get a biased estimate of the mean of uniform distribution using MLE under a certain proposed model.</p> <p>However</p> <p><a href="https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)#Estimation_of_midpoint" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)#Estimation_of_midpoint</a></p> <p>suggests that MLE is a uniformly minimum unbiased estimator of the mean, clearly under another proposed model.</p> <p>At this point it is still not very clear to me what's meant by MLE estimation if it is very hypothesized model dependent as opposed to say a sample mean estimator which is model neutral. At the end I am interested in estimating something about the population and don't really care about the estimation of a parameter of a hypothesized model.</p> <p><strong>EDIT 2</strong></p> <p>As @ChristophHanck showed the model with additional information introduced bias but did not manage to reduce the MSE.</p> <p>We also have additional results:</p> <p><a href="http://www.maths.manchester.ac.uk/~peterf/CSI_ch4_part1.pdf" rel="nofollow noreferrer">http://www.maths.manchester.ac.uk/~peterf/CSI_ch4_part1.pdf</a> (p61) <a href="http://www.cs.tut.fi/~hehu/SSP/lecture6.pdf" rel="nofollow noreferrer">http://www.cs.tut.fi/~hehu/SSP/lecture6.pdf</a> (slide 2) <a href="http://www.stats.ox.ac.uk/~marchini/bs2a/lecture4_4up.pdf" rel="nofollow noreferrer">http://www.stats.ox.ac.uk/~marchini/bs2a/lecture4_4up.pdf</a> (slide 5)</p> <blockquote> <p>"If a most efficient unbiased estimator ˆθ of θ exists (i.e. ˆθ is unbiased and its variance is equal to the CRLB) then the maximum likelihood method of estimation will produce it."</p> <p>"Moreover, if an efficient estimator exists, it is the ML estimator."</p> </blockquote> <p>Since the MLE with free model parameters is unbiased and efficient, by definition is this "the" Maximum Likelihood Estimator?</p> <p><strong>EDIT 3</strong></p> <p>@AlecosPapadopoulos has an example with Half Normal distribution on math forum.</p> <p><a href="https://math.stackexchange.com/questions/799954/can-the-maximum-likelihood-estimator-be-unbiased-and-fail-to-achieve-cramer-rao">https://math.stackexchange.com/questions/799954/can-the-maximum-likelihood-estimator-be-unbiased-and-fail-to-achieve-cramer-rao</a></p> <p>It is not anchoring any of its parameters like in the uniform case. I would say that settles it, though he hasn't demonstrated the bias of the mean estimator.</p> https://stats.stackexchange.com/questions/252129/-/252138#252138 32 Answer by Michael Hardy for Is there an example where MLE produces a biased estimate of the mean? Michael Hardy https://stats.stackexchange.com/users/5176 2016-12-17T20:56:06Z 2018-08-05T15:39:55Z <p>Christoph Hanck has not posted the details of his proposed example. I take it he means the uniform distribution on the interval $[0,\theta],$ based on an i.i.d. sample $X_1,\ldots,X_n$ of size more than $n=1.$</p> <p>The mean is $\theta/2$.</p> <p>The MLE of the mean is $\max\{X_1,\ldots,X_n\}/2.$</p> <p>That is biased since $\Pr(\max &lt; \theta) = 1,$ so $\operatorname{E}({\max}/2)&lt;\theta/2.$</p> <p><b>PS:</b> Perhaps we should note that the best unbiased estimator of the mean $\theta/2$ is <em>not</em> the sample mean, but rather is $$\frac{n+1} {2n} \cdot \max\{X_1,\ldots,X_n\}.$$ The sample mean is a lousy estimator of $\theta/2$ because for some samples, the sample mean is less than $\dfrac 1 2 \max\{X_1,\ldots,X_n\},$ and it is clearly impossible for $\theta/2$ to be less than ${\max}/2.$ <br><b>end of PS</b></p> <hr> <p>I suspect the Pareto distribution is another such case. Here's the probability measure: $$\alpha\left( \frac \kappa x \right)^\alpha\ \frac{dx} x \text{ for } x &gt;\kappa.$$ The expected value is $\dfrac \alpha {\alpha -1 } \kappa.$ The MLE of the expected value is $$\frac n {n - \sum_{i=1}^n \big((\log X_i) - \log(\min)\big)} \cdot \min$$ where $\min = \min\{X_1,\ldots,X_n\}.$</p> <p>I haven't worked out the expected value of the MLE for the mean, so I don't know what its bias is.</p> https://stats.stackexchange.com/questions/252129/-/252196#252196 10 Answer by Christoph Hanck for Is there an example where MLE produces a biased estimate of the mean? Christoph Hanck https://stats.stackexchange.com/users/67799 2016-12-18T09:27:12Z 2016-12-18T13:49:12Z <p>Although @MichaelHardy has made the point, here is a more detailed argument as to why the MLE of the maximum (and hence, that of the mean $\theta/2$, by invariance) is not unbiased, although it is in a different model (see the edit below).</p> <p>We estimate the upper bound of the uniform distribution $U[0,\theta]$. Here, $y_{(n)}$ is the MLE, for a random sample $y$. We show that $y_{(n)}$ is not unbiased. Its cdf is \begin{eqnarray*} F_{y_{(n)}}(x)&amp;=&amp;\Pr\{Y_1\leqslant x,\ldots,Y_n\leqslant x\}\\ &amp;=&amp;\Pr\{Y_1\leqslant x\}^n\\ &amp;=&amp;\begin{cases} 0&amp;\qquad\text{for}\quad x&lt;0\\ \left(\frac{x}{\theta}\right)^n&amp;\qquad\text{for}\quad 0\leqslant x\leqslant\theta\\ 1&amp;\qquad\text{for}\quad x&gt;\theta \end{cases} \end{eqnarray*} Thus, its density is $$f_{y_{(n)}}(x)= \begin{cases} \frac{n}{\theta}\left(\frac{x}{\theta}\right)^{n-1}&amp;\qquad\text{for}\quad 0\leqslant x\leqslant\theta\\ 0&amp;\qquad\text{else} \end{cases}$$ Hence, \begin{eqnarray*} E[Y_{(n)}]&amp;=&amp;\int_0^\theta x\frac{n}{\theta}\left(\frac{x}{\theta}\right)^{n-1}dx\\ &amp;=&amp;\int_0^\theta n\left(\frac{x}{\theta}\right)^{n}dx\\ &amp;=&amp;\frac{n}{n+1}\theta \end{eqnarray*}</p> <p>EDIT: It is indeed the case that (see the discussion in the comments) the MLE is unbiased for the mean in the case in which both the lower bound $a$ and upper bound $b$ are unknown. Then, the minimum $Y_{(1)}$ is the MLE for $a$, with (details omitted) expected value $$E(Y_{(1)})=\frac{na+b}{n+1}$$ while $$E(Y_{(n)})=\frac{nb+a}{n+1}$$ so that the MLE for $(a+b)/2$ is $$\frac{Y_{(1)}+Y_{(n)}}{2}$$ with expected value $$E\left(\frac{Y_{(1)}+Y_{(n)}}{2}\right)=\frac{na+b+nb+a}{2(n+1)}=\frac{a+b}{2}$$</p> <p>EDIT 2: To elaborate on Henry's point, here is a little simulation for the MSE of the estimators of the mean, showing that while the MLE if we do not know the lower bound is zero is unbiased, the MSEs for the two variants are identical, suggesting that the estimator which incorporates knowledge of the lower bound reduces variability.</p> <pre><code>theta &lt;- 1 mean &lt;- theta/2 reps &lt;- 500000 n &lt;- 5 mse &lt;- bias &lt;- matrix(NA, nrow = reps, ncol = 2) for (i in 1:reps){ x &lt;- runif(n, min = 0, max = theta) mle.knownlowerbound &lt;- max(x)/2 mle.unknownlowerbound &lt;- (max(x)+min(x))/2 mse[i,1] &lt;- (mle.knownlowerbound-mean)^2 mse[i,2] &lt;- (mle.unknownlowerbound-mean)^2 bias[i,1] &lt;- mle.knownlowerbound-mean bias[i,2] &lt;- mle.unknownlowerbound-mean } &gt; colMeans(mse)  0.01194837 0.01194413 &gt; colMeans(bias)  -0.083464968 -0.000121968 </code></pre> https://stats.stackexchange.com/questions/252129/-/252243#252243 4 Answer by AdamO for Is there an example where MLE produces a biased estimate of the mean? AdamO https://stats.stackexchange.com/users/8013 2016-12-18T17:44:45Z 2016-12-18T17:44:45Z <p>The famous Neyman Scott problem has an inconsistent MLE in that it never even converges to the right thing. Motivates the use of conditional likelihood.</p> <p>Take $(X_i, Y_i) \sim \mathcal{N}\left(\mu_i, \sigma^2 \right)$. The MLE of $\mu_i$ is $(X_i + Y_i)/2$ and of $\sigma^2$ is $\hat{\sigma}^2 = \sum_{i=1}^n \frac{1}{n} s_i^2$ with $s_i^2 = (X_i - \hat{\mu}_i)^2/2 + (Y_i - \hat{\mu}_i)^2/2 = (X_i - Y_i)^2 / 4$ which has expected value $\sigma^2/4$ and so biased by a factor of 2.</p> https://stats.stackexchange.com/questions/252129/-/252255#252255 18 Answer by Cliff AB for Is there an example where MLE produces a biased estimate of the mean? Cliff AB https://stats.stackexchange.com/users/76981 2016-12-18T18:47:22Z 2017-01-09T23:12:43Z <p>Here's an example that I think some may find surprising: </p> <p>In logistic regression, for any finite sample size with non-deterministic outcomes (i.e. $0 &lt; p_{i} &lt; 1$), any estimated regression coefficient is not only biased, the mean of the regression coefficient is actually undefined. </p> <p>This is because for any finite sample size, there is a positive probability (albeit very small if the number of samples is large compared with the number of regression parameters) of getting perfect separation of outcomes. When this happens, estimated regression coefficients will be either $-\infty$ or $\infty$. Having positive probability of being either $-\infty$ or $\infty$ implies the expected value is undefined. </p> <p>For more on this particular issue, see the <a href="https://stats.stackexchange.com/questions/45803/logistic-regression-in-r-resulted-in-hauck-donner-phenomenon-now-what">Hauck-Donner-effect</a>.</p> https://stats.stackexchange.com/questions/252129/-/252273#252273 5 Answer by Alecos Papadopoulos for Is there an example where MLE produces a biased estimate of the mean? Alecos Papadopoulos https://stats.stackexchange.com/users/28746 2016-12-18T20:15:56Z 2016-12-28T01:30:10Z <p>Completing here the omission in <a href="https://math.stackexchange.com/a/809496/87400">my answer over at math.se</a> referenced by the OP, </p> <p>assume that we have an i.i.d. sample of size $n$ of random variables following the <a href="http://en.wikipedia.org/wiki/Half-normal_distribution" rel="nofollow noreferrer">Half Normal</a> distribution. The density and moments of this distribution are</p> <p>$$f_H(x) = \sqrt{2/\pi}\cdot \frac 1{v^{1/2}}\cdot \exp\big\{-\frac {x^2}{2v} \big\} \\ E(X) = \sqrt{2/\pi}\cdot v^{1/2}\equiv \mu,\;\; \operatorname{Var}(X) = \left(1-\frac 2 \pi \right)v$$</p> <p>The log-likelihood of the sample is</p> <p>$$L(v\mid \mathbf x) = n\ln\sqrt{2/\pi}-\frac n2\ln v -\frac 1 {2v} \sum_{i=1}^n x_i^2$$</p> <p>The first derivative with respect to $v$ is</p> <p>$$\frac {\partial}{\partial v}L(v\mid\mathbf x) = -\frac n{2v} + \frac 1 {2v^2} \sum_{i=1}^n x_i^2,\implies \hat v_\text{MLE} = \frac 1n \sum_{i=1}^nx_i^2$$</p> <p>so it is a method of moments estimator. It is unbiased since,</p> <p>$$E(\hat v_\text{MLE}) = E(X^2) = \operatorname{Var}(X) + [E(X)])^2 = \left(1-\frac 2 \pi \right)v + \frac 2 \pi v = v$$</p> <p><em>But</em>, the resulting estimator for the <em>mean</em> is downward biased due to Jensen's inequality</p> <p>\begin{align} \hat \mu_\text{MLE} = \sqrt{2/\pi}\cdot \sqrt {\hat v_\text{MLE}} \implies &amp; E\left(\hat \mu_\text{MLE}\right) = \sqrt{2/\pi}\cdot E\left(\sqrt {\hat v_\text{MLE}}\,\right) \\[6pt] &amp; &lt; \sqrt{2/\pi}\cdot \left[\sqrt {E(\hat v_\text{MLE})}\,\right] = \sqrt{2/\pi}\cdot \sqrt v = \mu \end{align}</p> https://stats.stackexchange.com/questions/252129/-/313427#313427 3 Answer by Xi'an for Is there an example where MLE produces a biased estimate of the mean? Xi'an https://stats.stackexchange.com/users/7224 2017-11-13T07:13:41Z 2017-11-14T17:39:46Z <p>There is an infinite range of examples for this phenomenon since</p> <ol> <li>the maximum likelihood estimator of a bijective transform $\Psi(\theta)$ of a parameter $\theta$ is the bijective transform of the maximum likelihood estimator of $\theta$, $\Psi(\hat{\theta}_\text{MLE})$;</li> <li>the expectation of the bijective transform of the maximum likelihood estimator of $\theta$, $\Psi(\hat{\theta}_\text{MLE})$, $\mathbb{E}[\Psi(\hat{\theta}_\text{MLE})]$ is not the bijective transform of the expectation of the maximum likelihood estimator, $\Psi(\mathbb{E}[\hat{\theta}_\text{MLE}])$;</li> <li>most transforms $\Psi(\theta)$ are expectations of some transform of the data, $\mathfrak{h}(X)$, at least for exponential families, provided an inverse Laplace transform can be applied to them.</li> </ol>