$$l(\mu, \sigma^2) = -(n/2)\log (2\pi)-n \log(\sigma^2)-\frac{1}{2\sigma^2}\sum_{i=1}^{n}(x_i-\mu)^2,$$

where $\mu$ and $\sigma^2$ are both unknown.

How can I differentiate $l(\mu, \sigma^2)$ with respect to both $\mu$ and $\sigma^2$ ?

Actually, I am trying to calculate $\frac{\partial}{\partial\mathbf\theta}l(\mathbf\theta)$, where $\mathbf\theta$ is a parameter vector.

And in this example $\mathbf\theta=[\mu, \sigma^2]'$.

  • $\begingroup$ Are you looking for an estimator for $\mu$ using maximum likelihood ? $\endgroup$ Commented May 6, 2016 at 15:25
  • $\begingroup$ @callculus No, I am trying to find out Jeffreys prior. For a parameter vector $\mathbf \theta$, Jeffreys prior is, $$p_J(\mathbf \theta)\propto [-\mathbb E_{\mathbf X|\mathbf \theta}(\frac{\partial}{\partial\mathbf\theta}l(\mathbf\theta|\mathbf X))'(\frac{\partial}{\partial\mathbf\theta}l(\mathbf\theta|\mathbf X))]^{\frac{1}{2}} $$ $\endgroup$
    – user 31466
    Commented May 6, 2016 at 15:34
  • $\begingroup$ I´ve made an edit. I made a copy error. At the first derivative $(x_i-\mu) $ must not be squared. $\endgroup$ Commented May 6, 2016 at 16:13

1 Answer 1


The partial derivatives are

$$\frac{\partial L}{\partial \mu}=-\frac{1}{\sigma^2}\cdot \sum_{i=1}^n (x_i-\mu)\cdot (-1)$$

$$\frac{\partial L}{\partial \sigma}=\frac{2n}{\sigma}+\frac{1}{\sigma ^3}\cdot \sum_{i=1}^n (x_i-\mu)^2$$

Hint: It is helpful to transform $n\cdot log({\sigma ^2})$ into $2n\cdot log({\sigma })$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .