2014 May 21
Key methods of the distribution classes in scipy.stats
.
-
pdf — probability density function
- Probability of obtaining
x < q < x + dx
ispdf(x) dx
- Derivative of CDF
- Goes to 0 at ±∞ for anything not insane
- Not invertible because it’s hump-shaped!
- Probability of obtaining
-
cdf — cumulative distribution function
- Probability of obtaining
q < x
iscdf(x)
- Integral of CDF
- Invertible (to the PPf)
CDF = 1 – SF
cdf(-∞) = 0
cdf(+∞) = 1
- Probability of obtaining
-
ppf — percent-point function (inverse CDF)
- If many samples are drawn, a fraction z will have values
q < ppf(z)
. - PPF = inverse of CDF
- Domain is zero to unity, inclusive; range indeterminate, possibly infinite.
- If many samples are drawn, a fraction z will have values
-
sf — survival function
- Probability of obtaining
q > x
issf(x)
SF = 1 – CDF
sf(-∞) = 1
sf(+∞) = 0
- Probability of obtaining
-
isf — inverse survival function
- If many samples are drawn, a fraction z will have values
q > ppf(z)
. - ISF = inverse of SF (duh)
- Domain is zero to unity, inclusive; range indeterminate, possibly infinite.
- If many samples are drawn, a fraction z will have values
There also exist logpdf, logcdf, and logsf, with the intuitive definitions.