This module contains a large number of probability distributions as\n", "well as a growing library of statistical functions.
\n", "Each included distribution is an instance of the class rv_continous:\n", "For each given name the following methods are available:
\n", "rv_continuous([momtype, a, b, xtol, ...]) | \n", "A generic continuous random variable class meant for subclassing. | \n", "
rv_continuous.pdf(x, *args, **kwds) | \n", "Probability density function at x of the given RV. | \n", "
rv_continuous.logpdf(x, *args, **kwds) | \n", "Log of the probability density function at x of the given RV. | \n", "
rv_continuous.cdf(x, *args, **kwds) | \n", "Cumulative distribution function of the given RV. | \n", "
rv_continuous.logcdf(x, *args, **kwds) | \n", "Log of the cumulative distribution function at x of the given RV. | \n", "
rv_continuous.sf(x, *args, **kwds) | \n", "Survival function (1-cdf) at x of the given RV. | \n", "
rv_continuous.logsf(x, *args, **kwds) | \n", "Log of the survival function of the given RV. | \n", "
rv_continuous.ppf(q, *args, **kwds) | \n", "Percent point function (inverse of cdf) at q of the given RV. | \n", "
rv_continuous.isf(q, *args, **kwds) | \n", "Inverse survival function at q of the given RV. | \n", "
rv_continuous.moment(n, *args, **kwds) | \n", "n’th order non-central moment of distribution. | \n", "
rv_continuous.stats(*args, **kwds) | \n", "Some statistics of the given RV | \n", "
rv_continuous.entropy(*args, **kwds) | \n", "Differential entropy of the RV. | \n", "
rv_continuous.fit(data, *args, **kwds) | \n", "Return MLEs for shape, location, and scale parameters from data. | \n", "
rv_continuous.expect([func, args, loc, ...]) | \n", "Calculate expected value of a function with respect to the distribution. | \n", "
Calling the instance as a function returns a frozen pdf whose shape,\n", "location, and scale parameters are fixed.
\n", "Similarly, each discrete distribution is an instance of the class\n", "rv_discrete:
\n", "rv_discrete([a, b, name, badvalue, ...]) | \n", "A generic discrete random variable class meant for subclassing. | \n", "
rv_discrete.rvs(*args, **kwargs) | \n", "Random variates of given type. | \n", "
rv_discrete.pmf(k, *args, **kwds) | \n", "Probability mass function at k of the given RV. | \n", "
rv_discrete.logpmf(k, *args, **kwds) | \n", "Log of the probability mass function at k of the given RV. | \n", "
rv_discrete.cdf(k, *args, **kwds) | \n", "Cumulative distribution function of the given RV. | \n", "
rv_discrete.logcdf(k, *args, **kwds) | \n", "Log of the cumulative distribution function at k of the given RV | \n", "
rv_discrete.sf(k, *args, **kwds) | \n", "Survival function (1-cdf) at k of the given RV. | \n", "
rv_discrete.logsf(k, *args, **kwds) | \n", "Log of the survival function of the given RV. | \n", "
rv_discrete.ppf(q, *args, **kwds) | \n", "Percent point function (inverse of cdf) at q of the given RV | \n", "
rv_discrete.isf(q, *args, **kwds) | \n", "Inverse survival function (1-sf) at q of the given RV. | \n", "
rv_discrete.stats(*args, **kwds) | \n", "Some statistics of the given RV | \n", "
rv_discrete.moment(n, *args, **kwds) | \n", "n’th order non-central moment of distribution. | \n", "
rv_discrete.entropy(*args, **kwds) | \n", "Differential entropy of the RV. | \n", "
rv_discrete.expect([func, args, loc, lb, ...]) | \n", "Calculate expected value of a function with respect to the distribution | \n", "
alpha | \n", "An alpha continuous random variable. | \n", "
anglit | \n", "An anglit continuous random variable. | \n", "
arcsine | \n", "An arcsine continuous random variable. | \n", "
beta | \n", "A beta continuous random variable. | \n", "
betaprime | \n", "A beta prime continuous random variable. | \n", "
bradford | \n", "A Bradford continuous random variable. | \n", "
burr | \n", "A Burr continuous random variable. | \n", "
cauchy | \n", "A Cauchy continuous random variable. | \n", "
chi | \n", "A chi continuous random variable. | \n", "
chi2 | \n", "A chi-squared continuous random variable. | \n", "
cosine | \n", "A cosine continuous random variable. | \n", "
dgamma | \n", "A double gamma continuous random variable. | \n", "
dweibull | \n", "A double Weibull continuous random variable. | \n", "
erlang | \n", "An Erlang continuous random variable. | \n", "
expon | \n", "An exponential continuous random variable. | \n", "
exponweib | \n", "An exponentiated Weibull continuous random variable. | \n", "
exponpow | \n", "An exponential power continuous random variable. | \n", "
f | \n", "An F continuous random variable. | \n", "
fatiguelife | \n", "A fatigue-life (Birnbaum-Sanders) continuous random variable. | \n", "
fisk | \n", "A Fisk continuous random variable. | \n", "
foldcauchy | \n", "A folded Cauchy continuous random variable. | \n", "
foldnorm | \n", "A folded normal continuous random variable. | \n", "
frechet_r | \n", "A Frechet right (or Weibull minimum) continuous random variable. | \n", "
frechet_l | \n", "A Frechet left (or Weibull maximum) continuous random variable. | \n", "
genlogistic | \n", "A generalized logistic continuous random variable. | \n", "
genpareto | \n", "A generalized Pareto continuous random variable. | \n", "
genexpon | \n", "A generalized exponential continuous random variable. | \n", "
genextreme | \n", "A generalized extreme value continuous random variable. | \n", "
gausshyper | \n", "A Gauss hypergeometric continuous random variable. | \n", "
gamma | \n", "A gamma continuous random variable. | \n", "
gengamma | \n", "A generalized gamma continuous random variable. | \n", "
genhalflogistic | \n", "A generalized half-logistic continuous random variable. | \n", "
gilbrat | \n", "A Gilbrat continuous random variable. | \n", "
gompertz | \n", "A Gompertz (or truncated Gumbel) continuous random variable. | \n", "
gumbel_r | \n", "A right-skewed Gumbel continuous random variable. | \n", "
gumbel_l | \n", "A left-skewed Gumbel continuous random variable. | \n", "
halfcauchy | \n", "A Half-Cauchy continuous random variable. | \n", "
halflogistic | \n", "A half-logistic continuous random variable. | \n", "
halfnorm | \n", "A half-normal continuous random variable. | \n", "
hypsecant | \n", "A hyperbolic secant continuous random variable. | \n", "
invgamma | \n", "An inverted gamma continuous random variable. | \n", "
invgauss | \n", "An inverse Gaussian continuous random variable. | \n", "
invweibull | \n", "An inverted Weibull continuous random variable. | \n", "
johnsonsb | \n", "A Johnson SB continuous random variable. | \n", "
johnsonsu | \n", "A Johnson SU continuous random variable. | \n", "
ksone | \n", "General Kolmogorov-Smirnov one-sided test. | \n", "
kstwobign | \n", "Kolmogorov-Smirnov two-sided test for large N. | \n", "
laplace | \n", "A Laplace continuous random variable. | \n", "
logistic | \n", "A logistic (or Sech-squared) continuous random variable. | \n", "
loggamma | \n", "A log gamma continuous random variable. | \n", "
loglaplace | \n", "A log-Laplace continuous random variable. | \n", "
lognorm | \n", "A lognormal continuous random variable. | \n", "
lomax | \n", "A Lomax (Pareto of the second kind) continuous random variable. | \n", "
maxwell | \n", "A Maxwell continuous random variable. | \n", "
mielke | \n", "A Mielke’s Beta-Kappa continuous random variable. | \n", "
nakagami | \n", "A Nakagami continuous random variable. | \n", "
ncx2 | \n", "A non-central chi-squared continuous random variable. | \n", "
ncf | \n", "A non-central F distribution continuous random variable. | \n", "
nct | \n", "A non-central Student’s T continuous random variable. | \n", "
norm | \n", "A normal continuous random variable. | \n", "
pareto | \n", "A Pareto continuous random variable. | \n", "
pearson3 | \n", "A pearson type III continuous random variable. | \n", "
powerlaw | \n", "A power-function continuous random variable. | \n", "
powerlognorm | \n", "A power log-normal continuous random variable. | \n", "
powernorm | \n", "A power normal continuous random variable. | \n", "
rdist | \n", "An R-distributed continuous random variable. | \n", "
reciprocal | \n", "A reciprocal continuous random variable. | \n", "
rayleigh | \n", "A Rayleigh continuous random variable. | \n", "
rice | \n", "A Rice continuous random variable. | \n", "
recipinvgauss | \n", "A reciprocal inverse Gaussian continuous random variable. | \n", "
semicircular | \n", "A semicircular continuous random variable. | \n", "
t | \n", "A Student’s T continuous random variable. | \n", "
triang | \n", "A triangular continuous random variable. | \n", "
truncexpon | \n", "A truncated exponential continuous random variable. | \n", "
truncnorm | \n", "A truncated normal continuous random variable. | \n", "
tukeylambda | \n", "A Tukey-Lamdba continuous random variable. | \n", "
uniform | \n", "A uniform continuous random variable. | \n", "
vonmises | \n", "A Von Mises continuous random variable. | \n", "
wald | \n", "A Wald continuous random variable. | \n", "
weibull_min | \n", "A Frechet right (or Weibull minimum) continuous random variable. | \n", "
weibull_max | \n", "A Frechet left (or Weibull maximum) continuous random variable. | \n", "
wrapcauchy | \n", "A wrapped Cauchy continuous random variable. | \n", "
multivariate_normal | \n", "A multivariate normal random variable. | \n", "
bernoulli | \n", "A Bernoulli discrete random variable. | \n", "
binom | \n", "A binomial discrete random variable. | \n", "
boltzmann | \n", "A Boltzmann (Truncated Discrete Exponential) random variable. | \n", "
dlaplace | \n", "A Laplacian discrete random variable. | \n", "
geom | \n", "A geometric discrete random variable. | \n", "
hypergeom | \n", "A hypergeometric discrete random variable. | \n", "
logser | \n", "A Logarithmic (Log-Series, Series) discrete random variable. | \n", "
nbinom | \n", "A negative binomial discrete random variable. | \n", "
planck | \n", "A Planck discrete exponential random variable. | \n", "
poisson | \n", "A Poisson discrete random variable. | \n", "
randint | \n", "A uniform discrete random variable. | \n", "
skellam | \n", "A Skellam discrete random variable. | \n", "
zipf | \n", "A Zipf discrete random variable. | \n", "
Several of these functions have a similar version in scipy.stats.mstats\n", "which work for masked arrays.
\n", "describe(a[, axis]) | \n", "Computes several descriptive statistics of the passed array. | \n", "
gmean(a[, axis, dtype]) | \n", "Compute the geometric mean along the specified axis. | \n", "
hmean(a[, axis, dtype]) | \n", "Calculates the harmonic mean along the specified axis. | \n", "
kurtosis(a[, axis, fisher, bias]) | \n", "Computes the kurtosis (Fisher or Pearson) of a dataset. | \n", "
kurtosistest(a[, axis]) | \n", "Tests whether a dataset has normal kurtosis | \n", "
mode(a[, axis]) | \n", "Returns an array of the modal (most common) value in the passed array. | \n", "
moment(a[, moment, axis]) | \n", "Calculates the nth moment about the mean for a sample. | \n", "
normaltest(a[, axis]) | \n", "Tests whether a sample differs from a normal distribution. | \n", "
skew(a[, axis, bias]) | \n", "Computes the skewness of a data set. | \n", "
skewtest(a[, axis]) | \n", "Tests whether the skew is different from the normal distribution. | \n", "
tmean(a[, limits, inclusive]) | \n", "Compute the trimmed mean. | \n", "
tvar(a[, limits, inclusive]) | \n", "Compute the trimmed variance | \n", "
tmin(a[, lowerlimit, axis, inclusive]) | \n", "Compute the trimmed minimum | \n", "
tmax(a[, upperlimit, axis, inclusive]) | \n", "Compute the trimmed maximum | \n", "
tstd(a[, limits, inclusive]) | \n", "Compute the trimmed sample standard deviation | \n", "
tsem(a[, limits, inclusive]) | \n", "Compute the trimmed standard error of the mean. | \n", "
nanmean(x[, axis]) | \n", "Compute the mean over the given axis ignoring nans. | \n", "
nanstd(x[, axis, bias]) | \n", "Compute the standard deviation over the given axis, ignoring nans. | \n", "
nanmedian(x[, axis]) | \n", "Compute the median along the given axis ignoring nan values. | \n", "
variation(a[, axis]) | \n", "Computes the coefficient of variation, the ratio of the biased standard deviation to the mean. | \n", "
cumfreq(a[, numbins, defaultreallimits, weights]) | \n", "Returns a cumulative frequency histogram, using the histogram function. | \n", "
histogram2(a, bins) | \n", "Compute histogram using divisions in bins. | \n", "
histogram(a[, numbins, defaultlimits, ...]) | \n", "Separates the range into several bins and returns the number of instances in each bin. | \n", "
itemfreq(a) | \n", "Returns a 2-D array of item frequencies. | \n", "
percentileofscore(a, score[, kind]) | \n", "The percentile rank of a score relative to a list of scores. | \n", "
scoreatpercentile(a, per[, limit, ...]) | \n", "Calculate the score at a given percentile of the input sequence. | \n", "
relfreq(a[, numbins, defaultreallimits, weights]) | \n", "Returns a relative frequency histogram, using the histogram function. | \n", "
binned_statistic(x, values[, statistic, ...]) | \n", "Compute a binned statistic for a set of data. | \n", "
binned_statistic_2d(x, y, values[, ...]) | \n", "Compute a bidimensional binned statistic for a set of data. | \n", "
binned_statistic_dd(sample, values[, ...]) | \n", "Compute a multidimensional binned statistic for a set of data. | \n", "
obrientransform(*args) | \n", "Computes the O’Brien transform on input data (any number of arrays). | \n", "
signaltonoise(a[, axis, ddof]) | \n", "The signal-to-noise ratio of the input data. | \n", "
bayes_mvs(data[, alpha]) | \n", "Bayesian confidence intervals for the mean, var, and std. | \n", "
sem(a[, axis, ddof]) | \n", "Calculates the standard error of the mean (or standard error of measurement) of the values in the input array. | \n", "
zmap(scores, compare[, axis, ddof]) | \n", "Calculates the relative z-scores. | \n", "
zscore(a[, axis, ddof]) | \n", "Calculates the z score of each value in the sample, relative to the sample mean and standard deviation. | \n", "
sigmaclip(a[, low, high]) | \n", "Iterative sigma-clipping of array elements. | \n", "
threshold(a[, threshmin, threshmax, newval]) | \n", "Clip array to a given value. | \n", "
trimboth(a, proportiontocut[, axis]) | \n", "Slices off a proportion of items from both ends of an array. | \n", "
trim1(a, proportiontocut[, tail]) | \n", "Slices off a proportion of items from ONE end of the passed array distribution. | \n", "
f_oneway(*args) | \n", "Performs a 1-way ANOVA. | \n", "
pearsonr(x, y) | \n", "Calculates a Pearson correlation coefficient and the p-value for testing non-correlation. | \n", "
spearmanr(a[, b, axis]) | \n", "Calculates a Spearman rank-order correlation coefficient and the p-value to test for non-correlation. | \n", "
pointbiserialr(x, y) | \n", "Calculates a point biserial correlation coefficient and the associated p-value. | \n", "
kendalltau(x, y[, initial_lexsort]) | \n", "Calculates Kendall’s tau, a correlation measure for ordinal data. | \n", "
linregress(x[, y]) | \n", "Calculate a regression line | \n", "
ttest_1samp(a, popmean[, axis]) | \n", "Calculates the T-test for the mean of ONE group of scores. | \n", "
ttest_ind(a, b[, axis, equal_var]) | \n", "Calculates the T-test for the means of TWO INDEPENDENT samples of scores. | \n", "
ttest_rel(a, b[, axis]) | \n", "Calculates the T-test on TWO RELATED samples of scores, a and b. | \n", "
kstest(rvs, cdf[, args, N, alternative, mode]) | \n", "Perform the Kolmogorov-Smirnov test for goodness of fit. | \n", "
chisquare(f_obs[, f_exp, ddof, axis]) | \n", "Calculates a one-way chi square test. | \n", "
power_divergence(f_obs[, f_exp, ddof, axis, ...]) | \n", "Cressie-Read power divergence statistic and goodness of fit test. | \n", "
ks_2samp(data1, data2) | \n", "Computes the Kolmogorov-Smirnov statistic on 2 samples. | \n", "
mannwhitneyu(x, y[, use_continuity]) | \n", "Computes the Mann-Whitney rank test on samples x and y. | \n", "
tiecorrect(rankvals) | \n", "Tie correction factor for ties in the Mann-Whitney U and Kruskal-Wallis H tests. | \n", "
rankdata(a[, method]) | \n", "Assign ranks to data, dealing with ties appropriately. | \n", "
ranksums(x, y) | \n", "Compute the Wilcoxon rank-sum statistic for two samples. | \n", "
wilcoxon(x[, y, zero_method, correction]) | \n", "Calculate the Wilcoxon signed-rank test. | \n", "
kruskal(*args) | \n", "Compute the Kruskal-Wallis H-test for independent samples | \n", "
friedmanchisquare(*args) | \n", "Computes the Friedman test for repeated measurements | \n", "
ansari(x, y) | \n", "Perform the Ansari-Bradley test for equal scale parameters | \n", "
bartlett(*args) | \n", "Perform Bartlett’s test for equal variances | \n", "
levene(*args, **kwds) | \n", "Perform Levene test for equal variances. | \n", "
shapiro(x[, a, reta]) | \n", "Perform the Shapiro-Wilk test for normality. | \n", "
anderson(x[, dist]) | \n", "Anderson-Darling test for data coming from a particular distribution | \n", "
anderson_ksamp(samples[, midrank]) | \n", "The Anderson-Darling test for k-samples. | \n", "
binom_test(x[, n, p]) | \n", "Perform a test that the probability of success is p. | \n", "
fligner(*args, **kwds) | \n", "Perform Fligner’s test for equal variances. | \n", "
mood(x, y[, axis]) | \n", "Perform Mood’s test for equal scale parameters. | \n", "
boxcox(x[, lmbda, alpha]) | \n", "Return a positive dataset transformed by a Box-Cox power transformation. | \n", "
boxcox_normmax(x[, brack, method]) | \n", "Compute optimal Box-Cox transform parameter for input data. | \n", "
boxcox_llf(lmb, data) | \n", "The boxcox log-likelihood function. | \n", "
entropy(pk[, qk, base]) | \n", "Calculate the entropy of a distribution for given probability values. | \n", "
chi2_contingency(observed[, correction, lambda_]) | \n", "Chi-square test of independence of variables in a contingency table. | \n", "
contingency.expected_freq(observed) | \n", "Compute the expected frequencies from a contingency table. | \n", "
contingency.margins(a) | \n", "Return a list of the marginal sums of the array a. | \n", "
fisher_exact(table[, alternative]) | \n", "Performs a Fisher exact test on a 2x2 contingency table. | \n", "
ppcc_max(x[, brack, dist]) | \n", "Returns the shape parameter that maximizes the probability plot correlation coefficient for the given data to a one-parameter family of distributions. | \n", "
ppcc_plot(x, a, b[, dist, plot, N]) | \n", "Returns (shape, ppcc), and optionally plots shape vs. | \n", "
probplot(x[, sparams, dist, fit, plot]) | \n", "Calculate quantiles for a probability plot, and optionally show the plot. | \n", "
boxcox_normplot(x, la, lb[, plot, N]) | \n", "Compute parameters for a Box-Cox normality plot, optionally show it. | \n", "
gaussian_kde(dataset[, bw_method]) | \n", "Representation of a kernel-density estimate using Gaussian kernels. | \n", "
For many more stat related functions install the software R and the\n", "interface package rpy.
\n", "Software | Version |
---|---|
Python | 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] |
IPython | 2.3.1 |
OS | posix [linux2] |
numpy | 1.9.1 |
scipy | 0.14.0 |
Sun Dec 07 14:22:10 2014 CET |