1
$\begingroup$

I read that the implementations of Inverse-normal cumulative distribution function (CDF) /quantile / ppf in R, Python (scipy) and Excel give similar results. However, I can't find the very formulae which ensure this accuracy. Can you lead me to such functions?

$\endgroup$
  • 1
    $\begingroup$ "ensure this accuracy" or "demonstrate this similarity" $\endgroup$ – Henry Aug 13 at 21:30
  • $\begingroup$ Maybe described here stackoverflow.com/questions/19589191/… $\endgroup$ – william3031 Aug 13 at 22:48
  • $\begingroup$ There are a variety of algorithms by which the inverse cdf for the standard normal (and hence, any normal) may be approximated. Which did you want? $\endgroup$ – Glen_b Aug 14 at 3:26
  • 1
    $\begingroup$ I compared results from Excel and Python, and they differ after somewhere like 1^-10. I tried several approximations, but they differ way more, say 0,3. I'm gonna be using the function in another formula and transfer the calculation from Excel, so I need it to give quite similar results. $\endgroup$ – Julian Aug 14 at 4:30
  • 1
    $\begingroup$ And btw, I found such approximations dating from 1965 to present days, so there are plenty. But I need something close to the described above. $\endgroup$ – Julian Aug 14 at 6:34
0
$\begingroup$

What I found to be the best solution is this: Epure, Soranzo [2014] For F(x) when x(0;1) works great. The values for the quantile function (F-1) are needed to be 0.5 ≤ p < 1. However, I found the idea in other papers, that when p is below 0.5, you need to take 1-p and negate ( *-1 ) the whole expression. Looks like F-1(p) when p<0.5, then -(F-1(1-p)) does the job. From the test with p(0,0001;0,9999) graphically Excel's formulae and this approximation look identical. The maximum absolute difference (error) between the two arrays of results is 0,08114, and abs(diff^2) is 0,5969. Running the test I needed (utilizing those formulae) for 10 values the maximum difference is 0,0039878. So I think I will stick with this method.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.