# Convexity of Function of PDF and CDF of Standard Normal Random Variable

Please provide proof that $Q\left(x\right)=x^{2}+x\frac{\phi\left(x\right)}{\Phi\left(x\right)}$ is convex $\forall x>0$. Here, $\phi$ and $\mathbf{\Phi}$ are the standard normal PDF and CDF, respectively.

# 1) CALCULUS METHOD

I have tried the calculus method and have a formula for the second derivate, but am not able to show that it is positive $\forall x > 0$. Please let me know if you need any further details.

Finally, \begin{eqnarray*} \text{Let }Q\left(x\right)=x^{2}+x\frac{\phi\left(x\right)}{\Phi\left(x\right)} \end{eqnarray*} \begin{eqnarray*} \frac{\partial Q\left(x\right)}{\partial x} & = & 2x+x\left[-\frac{x\phi\left(x\right)}{\Phi\left(x\right)}-\left\{ \frac{\phi\left(x\right)}{\Phi\left(x\right)}\right\} ^{2}\right]+\frac{\phi\left(x\right)}{\Phi\left(x\right)} \end{eqnarray*} \begin{eqnarray*} \left.\frac{\partial Q\left(x\right)}{\partial x}\right|_{x=0} & = & \frac{\phi\left(0\right)}{\Phi\left(0\right)}>0 \end{eqnarray*} \begin{eqnarray*} \frac{\partial^{2}Q\left(x\right)}{\partial x^{2}} & = & 2+x\phi\left(x\right)\left[\frac{-\Phi^{2}\left(x\right)+x^{2}\Phi^{2}\left(x\right)+3x\phi\left(x\right)\Phi\left(x\right)+2\phi^{2}\left(x\right)}{\Phi^{3}\left(x\right)}\right]+2\left[-x\frac{\phi\left(x\right)}{\Phi\left(x\right)}-\left\{ \frac{\phi\left(x\right)}{\Phi\left(x\right)}\right\} ^{2}\right] \end{eqnarray*} \begin{eqnarray*} & = & 2+\phi\left(x\right)\left[\frac{x^{3}\Phi^{2}\left(x\right)+3x^{2}\phi\left(x\right)\Phi\left(x\right)+2x\phi^{2}\left(x\right)-3x\Phi^{2}\left(x\right)-2\phi\left(x\right)\Phi\left(x\right)}{\Phi^{3}\left(x\right)}\right]\\ \end{eqnarray*} \begin{eqnarray*} & = & \left[\frac{2\Phi^{3}\left(x\right)+x^{3}\Phi^{2}\left(x\right)\phi\left(x\right)+3x^{2}\phi^{2}\left(x\right)\Phi\left(x\right)+2x\phi^{3}\left(x\right)-3x\Phi^{2}\left(x\right)\phi\left(x\right)-2\phi^{2}\left(x\right)\Phi\left(x\right)}{\Phi^{3}\left(x\right)}\right] \end{eqnarray*} \begin{eqnarray*} \text{Let, }K\left(x\right)=2\Phi^{3}\left(x\right)+2x\phi^{3}\left(x\right)+\Phi^{2}\left(x\right)\phi\left(x\right)x\left[x^{2}-3\right]+\phi^{2}\left(x\right)\Phi\left(x\right)\left[3x^{2}-2\right] \end{eqnarray*} \begin{eqnarray*} K\left(0\right)=\frac{1}{4}-\frac{1}{2\pi}>0 \end{eqnarray*} For $x\geq\sqrt{3},K\left(x\right)>0$. For $x\in\left(0,\sqrt{3}\right)$, \begin{eqnarray*} K'\left(x\right) & = & 6\Phi^{2}\left(x\right)\phi\left(x\right)+2\phi^{3}\left(x\right)-6x^{2}\phi^{3}\left(x\right)+2\Phi\left(x\right)\phi^{2}\left(x\right)\left[x^{3}-3x\right]-\Phi^{2}\left(x\right)\phi\left(x\right)\left[x^{4}-3x^{2}\right]+\Phi^{2}\left(x\right)\phi\left(x\right)\left[3x^{2}-3\right]\\ & & -2\phi^{2}\left(x\right)\Phi\left(x\right)\left[3x^{3}-2x\right]+\phi^{3}\left(x\right)\left[3x^{2}-2\right]+\phi^{2}\left(x\right)\Phi\left(x\right)6x \end{eqnarray*} \begin{eqnarray*} K'\left(x\right) & = & 6\Phi^{2}\left(x\right)\phi\left(x\right)-3\Phi^{2}\left(x\right)\phi\left(x\right)+2\phi^{3}\left(x\right)-2\phi^{3}\left(x\right)+6x\Phi\left(x\right)\phi^{2}\left(x\right)-6x\Phi\left(x\right)\phi^{2}\left(x\right)+3x^{2}\Phi^{2}\left(x\right)\phi\left(x\right)+3x^{2}\Phi^{2}\left(x\right)\phi\left(x\right)\\ & & +2x^{3}\Phi\left(x\right)\phi^{2}\left(x\right)-6x^{3}\Phi\left(x\right)\phi^{2}\left(x\right)+3x^{2}\phi^{3}\left(x\right)-6x^{2}\phi^{3}\left(x\right)+4x\Phi\left(x\right)\phi^{2}\left(x\right)-x^{4}\Phi^{2}\left(x\right)\phi\left(x\right) \end{eqnarray*} \begin{eqnarray*} & = & 3\Phi^{2}\left(x\right)\phi\left(x\right)+6x^{2}\Phi^{2}\left(x\right)\phi\left(x\right)+4x\Phi\left(x\right)\phi^{2}\left(x\right)-3x^{2}\phi^{3}\left(x\right)-x^{4}\Phi^{2}\left(x\right)\phi\left(x\right)-4x^{3}\Phi\left(x\right)\phi^{2}\left(x\right) \end{eqnarray*} \begin{eqnarray*} =\phi\left(x\right)\left[3\Phi^{2}\left(x\right)+x\left\{ 6x\Phi^{2}\left(x\right)-3x\phi^{2}\left(x\right)-x^{3}\Phi^{2}\left(x\right)+4\Phi\left(x\right)\phi\left(x\right)\left[1-x^{2}\right]\right\} \right] \end{eqnarray*}

# 2) GRAPHICAL / NUMERICAL METHOD

I was also able to see this numerically and visually by plotting the graphs as shown below; but it would be helpful to have a proper proof.

Let's show the second derivative of $Q$ is positive for $x \ge 0$. First, we need to know how to differentiate $\Phi$ and $\phi$.

By definition,

$$\frac{d}{dx}\Phi(x) = \phi(x) = \frac{1}{\sqrt{2\pi}} \exp(-x^2/2).$$ Differentiating once more gives

$$\frac{d}{dx}\phi(x) = -x \phi(x).$$

Applying this result to another derivative yields

$$\frac{d^2}{dx^2}\phi(x) = (-1 + x^2)\phi(x).$$

Using these results, along with the usual product and quotient rules of differentiation, we find the numerator of the second derivative is the sum of six terms. (This result was obtained around the middle of the question.) It is convenient to arrange the terms into three groups:

\eqalign{ \Phi(x)^3\frac{d^2}{dx^2}Q(x)= &2 x \phi(x)^3 \\ &+\,3 x^2 \phi(x)^2 \Phi(x)+x^3 \phi(x) \Phi(x)^2 \\ &+\,\Phi(x) \left(-2 \phi(x)^2-3 x \phi(x) \Phi(x)+2 \Phi(x)^2\right). }

Because $\phi$ is a probability density, it is nonnegative and so is the distribution function $\Phi$. Thus only the third term could possibly be negative when $x\ge 0$. Its sign is the same as that of its second factor,

$$R(x) = -2 \phi(x)^2-3 x \phi(x) \Phi(x)+2 \Phi(x)^2.$$

There are many ways to show this factor cannot be negative. One is to note that

$$R(0) = -2\phi(0) + 2\Phi(0) = 1 - \sqrt{\frac{2}{\pi}} \gt 0.$$

Differentiation--using the same simple techniques as before--gives

$$\frac{d}{dx} R(x) = \phi(x)(x \phi(x) + (1 + 3x^2)\Phi(x))$$

which is plainly positive for $x\ge 0$. Therefore $R(x)$ is an increasing function on the interval $[0, \infty)$. Its minimum must be at $R(0) \gt 0$, proving $R(x)\gt 0$ for all $x \ge 0$.

We have shown $Q$ has positive second derivative for $x \ge 0$, QED.

• Thanks @whuber what an excellent answer. Much appreciate of your help. I was trying something similar and looking to crush the negative terms by using the postive terms, but had not yet tried the combination you tried above. Was overjoyed to see your result. – texmex Jun 23 '15 at 3:06