# Function of pdf and cdf of a lognormal random variable

Let $X$ be a r.v. with pdf $f(x)$ and let $F(x)$ be the distribution function.

Let $r(x)=\dfrac{x.f(x)}{(1-F(x))}$, Then for $x< e^u$ and $f(x)=\dfrac{e^{-\dfrac{(\log x-\mu)^2}{2}}}{x\sqrt{2\pi}}$ , the function $r(x)$ is

• Increasing in $x$
• Decreasing in $x$
• Constant
• None of the above

I basically first noted that $X$ has the lognormal distribution with parameter $\mu$ and $\sigma ^2=1$ and since $f(x)$ is continuosly differentiable in its domain, So I first figured out the mode of $X$ i.e. $x^* \in (0,\infty)$ that maximizes $f$ and in order to that I transformed $f$ to $\ln ({f})$ as its an increasing monotonnic tranformation.

This gave me $x^*=e^{\mu -1}$ and

• for $x<x^*$, $f(x)$ is increasing i.e. $f'(x)>0$
• for $x>x^*$, $f(x)$ is decreasing i.e. $f'(x)<0$

Then I finally differentiated $r(x)$ i.e.

\begin{align*} r'(x) &= \dfrac{\overset{(1)}{\left (1-F(x)\right )}\overset{(2)}{\left (f(x)+xf'(x) \right )}+\overset{(3)}{x\left (f(x) \right )^2}}{\left ( 1-F(x) \right )^2}\\ \end{align*}

1. (1) is always positive as $\begin{matrix} F(x) < 1 & \forall x \in (0, \infty) \end{matrix}$
2. (2) is positive for $x \le e^{\mu -1}$ but for $x \in (e^{\mu -1}, e^{\mu})$ we can't say anything
3. (3) is always positive

Therefore for $x\in (0,e^{\mu -1})$ $r(x)$ is increasing but for $x \in (e^{\mu -1}, e^{\mu})$ we can't say anything about $r(x)$. Therefore, for $x< e^u$ we can't say anything definite about $r(x)$ and none of the three options given are correct.

But as per answer key first option is correct i.e. $r(x)$ is increasing.

I don't know where I am going wrong.

If $X \sim \operatorname{LogNormal}(\mu,1)$, then $Y = \log X \sim \operatorname{Normal}(\mu,1)$. Consequently, $$f_X(x) = \frac{1}{x} f_Y(\log x),$$ and $$F_X(x) = \Pr[X \le x] = \Pr[\log X \le \log x] = \Pr[Y \le \log x] = F_Y(\log x).$$ It follows that $$r(x) = \frac{x f_X(x)}{1 - F_X(x)} = \frac{f_Y(\log x)}{1 - F_Y(\log x)} = \frac{f_Y(y)}{1 - F_Y(y)},$$ where $f_Y$ and $F_Y$ are the density and CDF of a normal distribution with mean $\mu$ and variance $1$. But this means that $r(e^x) = \lambda_Y(y)$; i.e. $r(e^x)$ is the hazard function of such a normal distribution.
Since $Y = Z + \mu$ for a standard normal variable $Z$, the hazard function of $Y$ is invariant with respect to the location parameter, so it suffices to consider the hazard of $Z$ (i.e., $\lambda_Y(y) = \lambda_Z(y - \mu)$). So all that remains is to look at \begin{align*} \frac{d}{dz}\left[\frac{e^{-z^2/2}}{1 - \Phi(z)}\right] &= \frac{(1-\Phi(z))(-z)e^{-z^2/2} - e^{-z^2/2}(-e^{-z^2/2}/\sqrt{2\pi})}{(1-\Phi(z))^2} \\ &= \frac{e^{-z^2/2}}{(1-\Phi(z))^2} \left( \frac{e^{-z^2/2}}{\sqrt{2\pi}} - z(1 - \Phi(z)) \right)\end{align*}. For $z < 0$, the term in parentheses is obviously positive; thus for $Y < \mu$, or equivalently, $X < e^{\mu}$, the hazard function is increasing.
In fact, $r$ is increasing for all $X$, not just for the given restriction.