I'm searching for the formula of the first derivative of a normal pdf. Is there a function in numpy or scipy to obtain it directly?
Asked
Active
Viewed 3,022 times
4
-
possible duplicate of [How do I compute derivative using Numpy?](http://stackoverflow.com/questions/9876290/how-do-i-compute-derivative-using-numpy) – Stiffo Jul 28 '15 at 12:46
-
3Not duplicate. This is a specific application of calculus with a precise answer, whereas the linked answer discusses general methodologies. – Daniel Johnson Jul 28 '15 at 18:00
1 Answers
3
The PDF of the normal distribution is:
scipy.stats.norm.pdf(x, mu, sigma)
Its derivative with respect to x is:
scipy.stats.norm.pdf(x, mu, sigma)*(mu - x)/sigma**2

Daniel Johnson
- 238
- 3
- 11