tags:

views:

21

answers:

1

Hello,

I'm trying to use the distribution functions in a Python program (the random functions I've got figured out; I'm looking specifically for gsl_cdf_beta_Pinv()) and I can't find it. Can someone tell me how I can use these or a fast alternative in a program?

Thanks,

Mark Ch.

+1  A: 

It's defined in this Cython source file (for module probability_distribution) as being mediated by the method cum_distribution_function_inv of an instance of class RealDistribution when its self.distribution_type==beta. So you should import the module, instantiate the class, and then call the method -- e.g.

from gsl import probability_distribution
thebeta = probability_distribution.RealDistribution(type='beta',
                                                    parameters=[alpha, beta])
print thebeta.cum_distribution_function_inv(0.1)

I don't have a GSL installation at hand to test this code (so there might be some minor detail wrong here!) but I do hope this points you in the right direction.

Alex Martelli