1
$\begingroup$

I have an optimization problem where gradient information would be necessary to use inside optimization tools. The problem is: the objective function is defined using the complementary cumulative normal distribution function $F(a)$ (with mean $\mu$ and standard deviation $\sigma$). So, is there a way to express the derivative w.r.t $a$ in an analytical form? Take $\phi$ for the Normal Distribution Function and $\Phi$ for the standard cumulative normal distribution function. Is it true that $$\frac{\partial F(a)}{\partial a} = \frac{\partial}{\partial a}\int_a^{+\infty}\frac{1}{\sigma\sqrt{2\pi}} \mbox{exp}\left(-\frac{(t-\mu)^2}{2\sigma^2}\right)dt$$ $$\frac{\partial F(a)}{\partial a} = 1-\frac{\partial}{\partial a}\Phi((t-\mu)/\sigma)$$ holds ? If so, can this be further simplified? Thanks in advance!

$\endgroup$

1 Answer 1

1
$\begingroup$

$F_x = 1 - \Phi((a-\mu)/\sigma))$, where $\Phi$ is the standard Normal distribution function. Its derivative w.r.t. $a$ therefore is $-\phi((a-\mu)/\sigma)/\sigma$, where $\phi$ is the standard Normal density function. I.e., substitute a for x in your integrand and take the negative.

Of course, this is just a special case of https://en.wikipedia.org/wiki/Leibniz_integral_rule .

$\endgroup$
4
  • $\begingroup$ Thanks for showing that it is just a Leibniz's rule. I changed the question to fit Leibniz notation as said in your link. But I got a bit confused. Using the rule, I think the answer would be $$\frac{d}{dx}F(a)= -\phi((a-\mu)/\sigma) + (1-\frac{1}{\sigma}\Phi((t-\mu)/\sigma))$$ $\endgroup$ Nov 22, 2017 at 19:34
  • $\begingroup$ The partial derivative of 1 is 0. The last Leibniz integral rule term is 0 because the partial derivative of the integrand w.r.t. a is 0. That leaves the formula as I've provided it. You can check by doing numerical differentiation; choose a $\sigma \ne 1$, and choose a small increment of a, such as 1e-4. Note that $\phi((a-\mu)/\sigma)/\sigma$ is the integrand in your original post; there is no extra dividing by $\sigma$ vs. what's in the integrand. $\endgroup$ Nov 22, 2017 at 20:26
  • $\begingroup$ Mark, perfect, sorry for my mistake. One more thing, in your answer, I didn't understand why there is an extra $\sigma$. The second term wouldn't be $$-f(x,a(x))\frac{d}{dx}a(x)=-f(x, a(x))=-\phi((a-\mu)/\sigma)?$$ $\endgroup$ Nov 22, 2017 at 21:41
  • 1
    $\begingroup$ There's not an "extra" $\sigma$ . $\phi((a-\mu)/\sigma)$ has only a sigma in the exponential, not a $\sigma$ in the denominator outside the exponential. So the derivative I provided is exactly the negative of the integrand in your original post with $a$ in p[lace of what you now call $t$, but at the time of my answer had called $x$. If your optimizer has an option to do a derivative check (by finite differencing), as many nonlinear optimizers do, it is probably a good idea to turn it on the first time you try to solve the problem. $\endgroup$ Nov 22, 2017 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .