0

$\Phi\left(x\right)$ is the CDF of a normal distribution with parameters $m$ and $\sigma$. Is there a way to solve for $\rho$ here?

$\Phi\left(x\right)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\frac{x-m}{\sigma}}e^{-\frac{t^{2}}{2}}dt.$
$\Phi^{-1}\left(\rho\right)+\rho = v.$

Context: I'm aware that the inverse of the normal distribution CDF does not have a closed-form solution, but I wondered if maybe there's a shortcut here, when taking the inverse of an inverse. Essentially, I have a function $f(\rho)=\rho$, that is supposed to affect the entire distribution, and this function is defined relative to the quantiles ($\rho$) it affects. After the effects have been added you end up with a new distribution, assuming it is normal, this distribution is going to have different parameters $m$ and $\sigma$ depending on $f(\rho)$. After calculating the effects $v$, it is possible to define a discrete set $Q$, where $\rho_i\in Q$, then use an optimizer to find parameters $m$ and $\sigma$ whose CDF given values $v$ generates quantiles closest to $Q$, but this feels like an indirect approach. I'd prefer a more direct solution, but so far I got nothing. Any feedback is welcome.

amWhy
  • 210,739
  • Could https://math.stackexchange.com/questions/3279660/how-to-find-inverse-cdf-for-the-range-of-normal-values-probit-for-a-range/3279672#3279672 be of any use ? – Claude Leibovici Apr 19 '24 at 10:48
  • I ended up trying many different approximations for the inverse CDF and most of them were too complex to arrive at a closed-form solution. The only one that worked was the simplified rational function $\sqrt{2}\frac{x-0.5}{0.25+0.5x}$, but here I ran into accuracy issues, with exploding inaccuracy for the PDF. – Victor Yerz Jun 23 '24 at 23:57
  • update: finally found a close enough approximation that can be solved relatively easily: $\frac{3.387(\rho-0.5)}{1-3.7(\rho-0.5)^{2}}$ – Victor Yerz Jun 26 '24 at 20:32

1 Answers1

1

Going over the problem again in a more general form, we have a CDF of a normal distribution with parameters $\mu$ and $\sigma$.

$\Phi\left(x\right)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\frac{x-\mu}{\sigma}}e^{-\frac{t^{2}}{2}}dt.$

There exists a function $f(\rho, s)$ that affects quantiles $\rho$ with shocks $s$. The resulting inverse normal CDF takes the form:

$\hat{\Phi}^{-1}\left(\rho, s\right) = \Phi^{-1}\left(\rho\right)+f(\rho, s).$

The goal is to find the CDF of this new distribution $\hat{\Phi}\left(x, s\right)$, after the effects of the function $f(\rho, s)$ are applied. Ideally, one would achieve this by solving for $\rho$. Sadly, it is not a straightforward task.

So far, I've managed to come up with a solution by adding a simplifying assumption. According to this assumption, after applying $f(\rho, s)$, the distribution will still be normal, or in other words, $f(\rho, s)$ simply affects the mean and standard deviation of the distribution. This way the effects of shock $s$ can be estimated through our existing CDF function since

$\hat{\Phi}\left(x, s, \mu, \sigma \right)=\Phi\left(x, \hat{\mu}(s), \hat{\sigma}(s)\right)$

The derivation of individual effects is also very simple. In the case of the normal distribution, the mean is equal to the median, making the following expression true:

$\mu = \Phi^{-1}\left(0.5\right)$

Thus, we can express the adjusted mean as:

$\hat{\mu}(s) = \hat{\Phi}^{-1}\left(0.5, s\right) = \Phi^{-1}\left(0.5\right)+f(0.5, s)$

Meanwhile, for the standard deviation of a normal distribution, we know that

$\sigma = \frac{\Phi^{-1}\left(\Phi_{sm}(1)\right)-\Phi^{-1}\left(\Phi_{sm}(-1)\right)}{2}$

where $\Phi_{sm}$ is simply the CDF of $N(0, 1)$ distribution. In other words, we are using the spread between the quantiles, to express $\sigma$. Given this, we can express the adjusted standard deviation as:

$\hat{\sigma}(s) = \frac{\hat{\Phi}^{-1}\left(\Phi_{sm}(1), s\right)-\hat{\Phi}^{-1}\left(\Phi_{sm}(-1), s\right)}{2}$

plugging these into the CDF equation we get

$\hat{\Phi}\left(x, s, \mu, \sigma \right)= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\frac{x-\hat{\mu}(s, \mu, \sigma)}{\hat{\sigma}(s, \mu, \sigma)}}e^{-\frac{t^{2}}{2}}dt$

Even tho this method "works", it still does not consider the non-normal effects that $f(\rho, s)$ can have on the distribution, so I am still looking for an alternative.

Update: Alternative 1

To include the non-normal effects, we can focus on inverting $\hat{\Phi}^{-1}\left(\rho, s\right)$. To do so, we need a way to express $\Phi^{-1}\left(\rho\right)$. In this case, I opt to use an approximation that is complex enough for it to have a sigmoid shape, yet simple enough to be solvable. Many, but not all rational functions derived from Acklam's algorithm fit this criteria. For this example we'll use the simplest one, where:

$\Phi^{-1}\left(\rho, \mu, \sigma\right)\approx \sigma\frac{3.387(\rho-0.5)}{1-3.7(\rho-0.5)^{2}}+\mu$

Meanwhile, for the shock function we'll assume that the effects change linearly across quantiles:

$f(\rho, s) = (-2.5\rho+0.5)s$

As such, our shock based inverse CDF can now be expressed as: $\hat{\Phi}^{-1}\left(\rho, s, \mu, \sigma\right) = \sigma\frac{3.387(\rho-0.5)}{1-3.7(\rho-0.5)^{2}}+\mu+(-2.5\rho+0.5)s$

For $\hat{\Phi}^{-1}\left(\rho, s, \mu, \sigma\right)=x$:

$\sigma\frac{3.387(\rho-0.5)}{1-3.7(\rho-0.5)^{2}}+\mu+(-2.5\rho+0.5)s=x$

If we try to solve this and collect all like terms, we'll end up with a cubic polynomial equation.

$(9.25s)\rho^{3}+(3.7x-3.7\mu-11.1s)\rho^{2}+(3.387\sigma+3.7\mu+1.6625s-3.7x)\rho+(0.075\mu-1.6935\sigma+0.0375s-0.075x)=0$

Next we can use the general cubic formula to find the function for the root.

$a=9.25s, b=3.7x-3.7\mu-11.1s$

$c=3.387\sigma+3.7\mu+1.6625s-3.7x$

$d=0.075\mu-1.6935\sigma+0.0375s-0.075x$

$\Delta_0=b^2-3ac=(3.7x-3.7\mu-11.1s)^2-3(9.25s)(3.387\sigma+3.7\mu+1.6625s-3.7x)$

$\Delta_1=2b^3-9abc+27a^2d=2(3.7x-3.7\mu-11.1s)^3-9(9.25s)(3.7x-3.7\mu-11.1s)(3.387\sigma+3.7\mu+1.6625s-3.7x)+27(9.25s)^2(0.075\mu-1.6935\sigma+0.0375s-0.075x)$

$C=\sqrt[3]{\frac{\Delta_1+\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}$

$\hat{\Phi}\left(x, s, \mu, \sigma\right)=-\frac{1}{3a}\left(b+C+\frac{\Delta_0}{C}\right)=-\frac{1}{27.75s}\left(3.7x-3.7\mu-11.1s+C+\frac{\Delta_0}{C}\right)$

It is also possible to identify the PDF of this new function by taking its derivative with respect to x. Below I plot the $N(4,1)$ PDF for the method with the assumption and the approximation for 0.2 and 1 shock values. For this specific case, the non-normal effects aren't that major.

Dist comp