0
$\begingroup$

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)

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – John Coleman May 7 '19 at 17:23
  • $\begingroup$ 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. $\endgroup$ – Pang May 9 '19 at 0:32
0
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$