Partial derivative of the given function.

48 Views Asked by At

I have been trying to find the partial derivative of the below function with respect to $\sigma$ but unable to arrive at the solution.

$$f(x_1,...,x_n|\mu,\sigma)=(\frac{1}{\sqrt{2\pi}\sigma})^n\ e^{-\sum_{i=1}^{n}\frac{(x_i-\mu)^2}{2\sigma^2}}$$

And the final solution given is:
$$-\frac{n}{\sigma}+\sum_{i=1}^{n}\frac{(x_i-\mu)^2}{\sigma^3}$$

But this looks the shortest possible solution which I am unable to arrive at. How to attain it?

2

There are 2 best solutions below

2
On BEST ANSWER

You are missing an $f$. The solution that you show is $\frac1f\frac{\partial f}{\partial\sigma}$, not $\frac{\partial f}{\partial\sigma}$. Here are the next couple of steps: $$f=gh$$ where $$g=(\frac{1}{\sqrt{2\pi}\sigma})^n\\h=e^{-\sum_{i=1}^{n}\frac{(x_i-\mu)^2}{2\sigma^2}}$$ Then $$\frac 1f \frac{\partial f}{\partial\sigma}=\frac{1}{gh}\frac{\partial g}{\partial\sigma}h+\frac{1}{gh}g\frac{\partial h}{\partial\sigma}=\frac1g\frac{\partial g}{\partial\sigma}+\frac1h\frac{\partial h}{\partial\sigma}$$ From here, the next steps should be trivial

0
On

It maybe more interesting to use the log in this case. $$ \log f = -N \log \sigma - \frac{1}{2\sigma^2} \sum_n (x_n-\mu)^2 + C $$ From chain rule $$ \frac{\partial \log f}{\partial \sigma}= \frac{\partial \log f}{\partial f}\frac{\partial f}{\partial \sigma}= \frac{1}{f}\frac{\partial f}{\partial \sigma} $$ and $$ \frac{\partial \log f}{\partial \sigma}= - \frac{N}{\sigma} + \frac{1}{\sigma^3} \sum_n (x_n-\mu)^2 $$ Finally $$ \frac{\partial f}{\partial \sigma}= \frac{f}{\sigma^3} \left[ \sum_n (x_n-\mu)^2 -N\sigma^2 \right] $$