I have a simple linear regression equation $y_i=\beta_1x_i+\epsilon_i$ and I need to find the maximum likelihood estimator of $\sigma^2$. I believe the log likelihood function for this model is l$(\beta_1,\sigma^2)=-\frac{n}{2}\ln{(2\pi\sigma^2)}-\frac{1}{2\sigma^2}\sum_{i=1}^n(y_i-\beta_1x_i)$ but when I derive it with respect to $\sigma^2$ , set it equal to 0, and attempt to solve for $\sigma^2$ I get a result that is undefined. The way I got to this undefined solution is: dl/d$\beta_1$=$-\frac{n\pi}{\sigma}+\frac{1}{\sigma}\sum_{i=1}^n(y_i\beta_1)^2=^{set}=0$. When I solve for $\sigma$ I get $0=\frac{1}{\sigma}$ which is an undefined result. Could anyone help me out?
1 Answer
$\begingroup$
$\endgroup$
Thanks for sharing your attempt. You should be writing $\frac{dl}{d\sigma}$ instead of $\frac{dl}{d\beta_1}$, but you seem to be trying to differentiate with respect to $\sigma$ anyway.
However, you seem to not have taken the derivative w.r.t $\sigma$ correctly. I think the second term should be $\frac{1}{\sigma^3}\sum_i (y_i - \beta_1 x_i)$