# Calculate the derivative of the CDF with respect to the mean value [duplicate]

I want to derive the cumulative density function (cdf) for variables following normal distribution with respect to the parameters of the cdf (such as the mean or the standard deviation)

• 1) You have informed us of a desire ("I want ...") but failed to ask a question. 2) The question which seems to be implicit in your post isn't really a programming question so seems to be off-topic on Stack Overflow. – John Coleman May 7 '19 at 17:23
• I'm voting to close this question as off-topic because it is about mathematics instead of directly about programming / coding / programming tools / software algorithms. – Pang May 9 '19 at 0:32

If your normal distribution has mean m and sd s then its CDF is

C(m,s,X) = Phi( (X-m)/s)


where Phi is the CDF of the standard normal distribution. Therefore, for example,

d/dm C (m,s,X) = Phi'( (X-m)/s) * d/dm (X-m)/s


The derivative of Phi is the standard normal density.

I think its always worth testing implementations of derivatives, and a simple technique is to check the integral of the derivative is the original function. For example for various values of X,s,m0,m1 one can check that

C(m1,s,X) - C(m0,s,X) = Integral{ m0<=m<=m1 | d/dm C(m,s.X) }


where the integral is evaluated numerically.