bundles / scipy latest / scipy / stats / _continuous_distns / betaprime_gen
class
scipy.stats._continuous_distns:betaprime_gen
Signature
class betaprime_gen ( momtype = 1 , a = None , b = None , xtol = 1e-14 , badvalue = None , name = None , longname = None , shapes = None , seed = None ) Members
Summary
A beta prime continuous random variable.
Extended Summary
%(before_notes)s
Notes
The probability density function for betaprime is:
for , , , where is the beta function (see scipy.special.beta).
betaprime takes a and b as shape parameters.
The distribution is related to the beta distribution as follows: If follows a beta distribution with parameters , then has a beta prime distribution with parameters ([1]).
The beta prime distribution is a reparametrized version of the F distribution. The beta prime distribution with shape parameters a and b and scale = s is equivalent to the F distribution with parameters d1 = 2*a, d2 = 2*b and scale = (a/b)*s. For example,
>>> from scipy.stats import betaprime, f >>> x = [1, 2, 5, 10] >>> a = 12 >>> b = 5 >>> betaprime.pdf(x, a, b, scale=2) array([0.00541179, 0.08331299, 0.14669185, 0.03150079]) >>> f.pdf(x, 2*a, 2*b, scale=(a/b)*2) array([0.00541179, 0.08331299, 0.14669185, 0.03150079])
%(after_notes)s
Aliases
-
scipy.stats._continuous_distns.betaprime_gen