2014 May 21
Key methods of the distribution classes in scipy.stats.
-
pdf — probability density function
- Probability of obtaining
x < q < x + dxispdf(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 < xiscdf(x) - Integral of CDF
- Invertible (to the PPf)
CDF = 1 – SFcdf(-∞) = 0cdf(+∞) = 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 > xissf(x) SF = 1 – CDFsf(-∞) = 1sf(+∞) = 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.