[SciPy-user] Definition of random variable

Jonas Kahn jonas.kahn at math.u-psud.fr
Wed Dec 6 12:35:40 CST 2006


I try to create a new instance of the rv_continuous class, and the __init__ 
is not very explicit...

Essentially, I would like to define it from the probability distribution 
only, and I guess (totally without any ground for that) that it is 
implemented as such.
Especially I would like to use the associated inverse survival function, 
without writing it by myself. Of course I could use the routines for solving 
equations to get it...
Alternatively, is there any way to get the inverse function of a monotonic 

Thanks for the help

PS: I think there is something wrong with the "scale" parameter in the 
package, or I have not understood how to use it. There is no change to the 
pdf when I try to give it another value as 1:

In [124]: stats.binom.rvs(1,1)
Out[124]: array([1])

# No problem with loc
In [126]: stats.binom.rvs(1,1, loc = 10)
Out[126]: array([11])

# But nothing with scale, with or without loc
In [127]: stats.binom.rvs(1,1, loc = 10, scale =100)
Out[127]: array([11])

In [128]: stats.binom.rvs(1,1, scale =100)
Out[128]: array([1])

More information about the SciPy-user mailing list