1

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"?

Haitao Du
  • 32,885
  • 17
  • 118
  • 213
  • 2
    Yeah, that's an obvious typo/mistake. I just fixed it. – Matthew Gunn Mar 15 '17 at 02:08
  • 1
    @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 – Haitao Du Mar 15 '17 at 02:11
  • Good eye. I'm not fluent in R, but I think you're right. – Matthew Gunn Mar 15 '17 at 02:13
  • 1
    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? – Matthew Gunn Mar 15 '17 at 02:15
  • @MatthewGunn I am sure the answer is wrong... In the results of `linear.MLE$estimate` the answer is $2.7$ and $1.71$, where, $1.7$ is the square of $1.3$!!! – Haitao Du Mar 15 '17 at 02:23
  • As I commented below, that answer is not "wrong". As @MatthewGunn wrote, it "has a small error" - this is a much more fair description. – amoeba Mar 15 '17 at 08:26
  • 2
    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. – whuber Mar 15 '17 at 11:53
  • @whuber thanks for your comments. The reason I was excited of it is because I spent a lot of time to investigate the relationship between manually optimize the function and use R. I was confused for a long time and thinking about it may be non convergence or numerical issue. Finally I found the answer was not correct... – Haitao Du Mar 15 '17 at 15:24
  • 7
    OP of the problem question here. I [have made the corrections as suggested](https://stats.stackexchange.com/revisions/112469/6), 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. – gregmacfarlane Mar 15 '17 at 21:08

0 Answers0