I want to know how to take the derivative of a Normal CDF w.r.t its mean using a more general method than using the normalization function.
A Normal CDF is definied by $\Phi(\frac{x-\mu}{\sigma})$. Using chain rule is straight forward to calculated its derivative w.r.t. its mean: \begin{equation} \frac{\partial}{\partial \mu} F(x)= \frac{\partial}{\partial \mu} \Phi(\frac{x-\mu}{\sigma}) = - \frac{1}{\sigma} \phi(\frac{x-\mu}{\sigma}) \end{equation} I would like to get the same result using the proper CDF Function. \begin{equation} \frac{\partial}{\partial \mu} F(x)=\frac{\partial}{\partial \mu} \int_{-\infty}^x \frac{1}{\sigma\sqrt{2 \pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} dx \end{equation} MY TRIAL (verified by online calculators):
The bounds of the integral are not a function of $\mu$ so (by Leibiniz Rule) the derivative can go inside: \begin{equation} \frac{\partial}{\partial \mu} \int_{-\infty}^x \frac{1}{\sigma\sqrt{2 \pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} dx=\int_{-\infty}^x \frac{\partial}{\partial \mu} \frac{1}{\sigma\sqrt{2 \pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} dx = \int_{-\infty}^x \frac{1}{\sigma\sqrt{2 \pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} · (- \frac{-2x+2\mu}{2\sigma^2} )dx \end{equation} Simplifying terms and rearrengin conviniently the last term becomes \begin{equation} \frac{1}{\sigma\sqrt{2 \pi}}\int_{-\infty}^x e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} · \frac{x-\mu}{\sigma} \frac{1}{\sigma} dx \end{equation} Using Change of Variable: \begin{equation} z=\frac{x-\mu}{\sigma} \Rightarrow \frac{dz}{dx}= \frac{1}{\sigma} \Rightarrow dx= \sigma dz \end{equation} \begin{equation} \frac{1}{\sigma\sqrt{2 \pi}} \int_{-\infty}^x e^{-\frac{1}{2}z^2} · z \frac{1}{\sigma} \sigma dz = \frac{1}{\sigma\sqrt{2 \pi}}\left[-e^{-\frac{1}{2}z^2} \right]^x_{-\infty} =\frac{1}{\sigma\sqrt{2 \pi}}\left[-e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} \right]^x_{-\infty} = -\frac{1}{\sigma\sqrt{2 \pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} = -\phi(\frac{x-\mu}{\sigma}) \end{equation} If we compare it with the inital statement, there is a $1/\sigma$ missing. Introducing the derivative in an online calculator and the result into a calculuator of integrals gives exactly the same result. So I'm going crazy with this.
Thanks in advance!
The last equality in your answer is false. $$\frac{1}{\sqrt{2\pi}}e^{-\frac12x^2}=\phi(x)$$ so that: $$-\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac12\left(\frac{x-\mu}{\sigma}\right)^2}=-\frac1{\sigma}\phi\left(\frac{x-\mu}{\sigma}\right)$$