scipy/numpy inverse cumulative normal

noonoo joojoo at joo.com
Mon Apr 10 17:42:49 EDT 2006


In article <mailman.4266.1144520725.27775.python-list at python.org>, 
robert.kern at gmail.com says...
> bartsimpson8882002 at yahoo.com wrote:
> > I was wondering if scipy/numpy has the inverse cumulative normal 
> > function, ie the function f in this expression
> > 
> > f(scipy.stats.norm.cdf(1.2)) = 1.2
> > 
> > or more generally, a function f which fits the criteria
> > 
> > f(scipy.stats.norm.cdf(x)) = x
> 
> Look in the file where all of the distributions are defined,
> Lib/stats/distributions.py . You will find that each distribution object also
> has a method call .ppf(), the Percent Point Function, the inverse of the CDF.
> 
> In [1]: from scipy.stats import norm
> 
> In [2]: norm.ppf(norm.cdf(1.2))
> Out[2]: array(1.2000000000000004)
> 
> > There is a distribution called invnorm, but I am not sure of how to use
> > it.
> 
> invnorm is another probability distribution entirely. Don't bother with it.
> 
> 
Great thanks very much. Exactly what I was looking for. And seeing the 
scipy.info for ppf, that's exactly what it says as well. Got distracted 
by the invnorm distribution :-(



More information about the Python-list mailing list