I am searching for a python equivalent of the norminv
function in Matlab.
Or in other words (from the above description): I am searching for the "Normal inverse cumulative distribution function" in python, or probably in the stats part of scipy (Or maybe numpy?)
I would guess that it exists in scipy, but probably under another name than in matlab, or in matlabs help page. However I am not sure of this functions other names, or exact workings, so I am having a hard time finding it. And unfortunately it's not simply the "Inverse normal cumul…" instead of the "Normal inverse cumul…"
It depends exactly on what you want. If you want the cdf
of a distribution that is the inverse of the normal distribution, you want invgauss
, "An inverse Gaussian continuous random variable.". To get the cdf
, you would need to use the invgauss.cdf
method. 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 the inverse of the cdf
of the normal distribution, you want the ppf
method of the norm
distribution, which is the "Percent point function (inverse of cdf — percentiles)."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With