What is the [Sci / Num] Python equivalent of Matlabs "norminv" (normal inverse cumulative distribution function)

I am looking for the equivalent of python function norminvin matlab.

Or, in other words (from the description above): I am looking for a “normal inverse cumulative distribution function” in python or perhaps in the statistical part of scipy (or maybe numpy?)

I would suggest that it exists in scipy, but probably under a different name than in matlab, or on the matlabs help page. However, I am not sure about the function of other names or exact workings, so it is difficult for me to find it. And, unfortunately, this is not just "Reverse normal cumulus ..." instead of "Normal reverse cumulus ..."

+4
source share
1 answer

It depends on what you want. If you want the cdfdistribution to be inverse to the normal distribution, you want invgauss, "Inverse Gaussian continuous random variable.". To get cdf, you need to use a method invgauss.cdf. Adapted from the documentation:

from scipy.stats import invgauss
mu = 0.145462645553
vals = invgauss.ppf([0.001, 0.5, 0.999], mu)
res = invgauss.cdf(vals, mu)

On the other hand, if you want to invert the cdfnormal distribution, you need a method ppf normthat is the "Point function of percent (the inverse of cdf percentiles)."

+1
source

All Articles