In article <ma***************************************@python. org>,

ro*********@gmail.com says...

ba****************@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 :-(