1
$\begingroup$

In this popular question, Maximum Likelihood Estimation (MLE) in layman terms, The most voted answer by @gregmacfarlane says

In a linear model, we assume that the points follow a normal (Gaussian) probability distribution, with mean $x\beta$ and standard deviation $\sigma^2$

Is this statement wrong? where it should be with "variance" $\sigma^2$ but not "standard deviation". And why in the end of the answer, r, summary on linear model says "Residual standard error: 1.32", but not "Residual variance: 1.32"?

$\endgroup$
  • 2
    $\begingroup$ Yeah, that's an obvious typo/mistake. I just fixed it. $\endgroup$ – Matthew Gunn Mar 15 '17 at 2:08
  • 1
    $\begingroup$ @MatthewGunn i think it is still not fixed. since the code has sigma2 every where, I think it should be sigma. because rnorm function takes sd as input parameter not variance $\endgroup$ – Haitao Du Mar 15 '17 at 2:11
  • 1
    $\begingroup$ Perhaps a good question for meta. What's the right course of action when an old but popular answer on a popular question has a small error in the code and what appears to be a figure generated from that code? $\endgroup$ – Matthew Gunn Mar 15 '17 at 2:15
  • 2
    $\begingroup$ The best possible errors to make are the obvious and inconsequential ones that any engaged reader will know how to fix. Textbooks are chock full of these--especially at advanced levels. People usually appreciate having them pointed out so they can be corrected, but making a big deal of it is rarely productive. Writing "$\sigma^2$" instead of "$\sigma$" in a few places is about as minor as it gets--certainly not worthy of three exclamation points. $\endgroup$ – whuber Mar 15 '17 at 11:53
  • 7
    $\begingroup$ OP of the problem question here. I have made the corrections as suggested, and I'm glad the @hxd1011 took the time to uncover my errors. There were a half-dozen chunks that needed correction, and I additionally added a constrained optimization to keep the variance positive. $\endgroup$ – gregmacfarlane Mar 15 '17 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.