scipy.stats

https://docs.scipy.org/doc/scipy/reference/stats.html

通用方法

通用方法描述
rv_continuous([momtype, a, b, xtol, …])生成一般连续的随机变量对象
rv_discrete([a, b, name, badvalue, …])生成一般的离散的随机变量对象
rv_histogram(histogram, *args, **kwargs)Generates a distribution given by a histogram.

连续分布(Continuous distributions)

名称描述
alphaAn alpha continuous random variable.
anglitAn anglit continuous random variable.
arcsineAn arcsine continuous random variable.
argusArgus distribution
betaA beta continuous random variable.
betaprimeA beta prime continuous random variable.
bradfordA Bradford continuous random variable.
burrA Burr (Type III) continuous random variable.
burr12A Burr (Type XII) continuous random variable.
cauchyA Cauchy continuous random variable.
chiA chi continuous random variable.
chi2A chi-squared continuous random variable.
cosineA cosine continuous random variable.
dgammaA double gamma continuous random variable.
dweibullA double Weibull continuous random variable.
erlangAn Erlang continuous random variable.
exponAn exponential continuous random variable.
exponnormAn exponentially modified Normal continuous random variable.
exponweibAn exponentiated Weibull continuous random variable.
exponpowAn exponential power continuous random variable.
fAn F continuous random variable.
fatiguelifeA fatigue-life (Birnbaum-Saunders) continuous random variable.
fiskA Fisk continuous random variable.
foldcauchyA folded Cauchy continuous random variable.
foldnormA folded normal continuous random variable.
frechet_rA Frechet right (or Weibull minimum) continuous random variable.
frechet_lA Frechet left (or Weibull maximum) continuous random variable.
genlogisticA generalized logistic continuous random variable.
gennormA generalized normal continuous random variable.
genparetoA generalized Pareto continuous random variable.
genexponA generalized exponential continuous random variable.
genextremeA generalized extreme value continuous random variable.
gausshyperA Gauss hypergeometric continuous random variable.
gammaA gamma continuous random variable.
gengammaA generalized gamma continuous random variable.
genhalflogisticA generalized half-logistic continuous random variable.
gilbratA Gilbrat continuous random variable.
gompertzA Gompertz (or truncated Gumbel) continuous random variable.
gumbel_rA right-skewed Gumbel continuous random variable.
gumbel_lA left-skewed Gumbel continuous random variable.
halfcauchyA Half-Cauchy continuous random variable.
halflogisticA half-logistic continuous random variable.
halfnormA half-normal continuous random variable.
halfgennormThe upper half of a generalized normal continuous random variable.
hypsecantA hyperbolic secant continuous random variable.
invgammaAn inverted gamma continuous random variable.
invgaussAn inverse Gaussian continuous random variable.
invweibullAn inverted Weibull continuous random variable.
johnsonsbA Johnson SB continuous random variable.
johnsonsuA Johnson SU continuous random variable.
kappa4Kappa 4 parameter distribution.
kappa3Kappa 3 parameter distribution.
ksoneGeneral Kolmogorov-Smirnov one-sided test.
kstwobignKolmogorov-Smirnov two-sided test for large N.
laplaceA Laplace continuous random variable.
levyA Levy continuous random variable.
levy_lA left-skewed Levy continuous random variable.
levy_stableA Levy-stable continuous random variable.
logisticA logistic (or Sech-squared) continuous random variable.
loggammaA log gamma continuous random variable.
loglaplaceA log-Laplace continuous random variable.
lognormA lognormal continuous random variable.
lomaxA Lomax (Pareto of the second kind) continuous random variable.
maxwellA Maxwell continuous random variable.
mielkeA Mielke’s Beta-Kappa continuous random variable.
nakagamiA Nakagami continuous random variable.
ncx2A non-central chi-squared continuous random variable.
ncfA non-central F distribution continuous random variable.
nctA non-central Student’s T continuous random variable.
norm一个正态分布
paretoA Pareto continuous random variable.
pearson3A pearson type III continuous random variable.
powerlawA power-function continuous random variable.
powerlognormA power log-normal continuous random variable.
powernormA power normal continuous random variable.
rdistAn R-distributed continuous random variable.
reciprocalA reciprocal continuous random variable.
rayleighA Rayleigh continuous random variable.
riceA Rice continuous random variable.
recipinvgaussA reciprocal inverse Gaussian continuous random variable.
semicircularA semicircular continuous random variable.
skewnormA skew-normal random variable.
tA Student’s T continuous random variable.
trapzA trapezoidal continuous random variable.
triangA triangular continuous random variable.
truncexponA truncated exponential continuous random variable.
truncnormA truncated normal continuous random variable.
tukeylambdaA Tukey-Lamdba continuous random variable.
uniformA uniform continuous random variable.
vonmisesA Von Mises continuous random variable.
vonmises_lineA Von Mises continuous random variable.
waldA Wald continuous random variable.
weibull_minA Frechet right (or Weibull minimum) continuous random variable.
weibull_maxA Frechet left (or Weibull maximum) continuous random variable.
wrapcauchyA wrapped Cauchy continuous random variable.

多元分布(Multivariate distributions)

名称描述
multivariate_normalA multivariate normal random variable.
matrix_normalA matrix normal random variable.
dirichletA Dirichlet random variable.
wishartA Wishart random variable.
invwishartAn inverse Wishart random variable.
multinomialA multinomial random variable.
special_ortho_groupA matrix-valued SO(N) random variable.
ortho_groupA matrix-valued O(N) random variable.
random_correlationA random correlation matrix.

离散分布(Discrete distributions)

名称描述
bernoulliA Bernoulli discrete random variable.
binomA binomial discrete random variable.
boltzmannA Boltzmann (Truncated Discrete Exponential) random variable.
dlaplaceA Laplacian discrete random variable.
geomA geometric discrete random variable.
hypergeomA hypergeometric discrete random variable.
logserA Logarithmic (Log-Series, Series) discrete random variable.
nbinomA negative binomial discrete random variable.
planckA Planck discrete exponential random variable.
poissonA Poisson discrete random variable.
randintA uniform discrete random variable.
skellamA Skellam discrete random variable.
zipfA Zipf discrete random variable.

统计方法(Statistical functions)

方法描述
describe(a[, axis, ddof, bias, nan_policy])Computes several descriptive statistics of the passed array.
gmean(a[, axis, dtype])Compute the geometric mean along the specified axis.
hmean(a[, axis, dtype])Calculates the harmonic mean along the specified axis.
kurtosis(a[, axis, fisher, bias, nan_policy])Computes the kurtosis (Fisher or Pearson) of a dataset.
kurtosistest(a[, axis, nan_policy])Tests whether a dataset has normal kurtosis
mode(a[, axis, nan_policy])Returns an array of the modal (most common) value in the passed array.
moment(a[, moment, axis, nan_policy])Calculates the nth moment about the mean for a sample.
normaltest(a[, axis, nan_policy])Tests whether a sample differs from a normal distribution.
skew(a[, axis, bias, nan_policy])Computes the skewness of a data set.
skewtest(a[, axis, nan_policy])Tests whether the skew is different from the normal distribution.
kstat(data[, n])Return the nth k-statistic (1<=n<=4 so far).
kstatvar(data[, n])Returns an unbiased estimator of the variance of the k-statistic.
tmean(a[, limits, inclusive, axis])Compute the trimmed mean.
tvar(a[, limits, inclusive, axis, ddof])Compute the trimmed variance
tmin(a[, lowerlimit, axis, inclusive, …])Compute the trimmed minimum
tmax(a[, upperlimit, axis, inclusive, …])Compute the trimmed maximum
tstd(a[, limits, inclusive, axis, ddof])Compute the trimmed sample standard deviation
tsem(a[, limits, inclusive, axis, ddof])Compute the trimmed standard error of the mean.
variation(a[, axis, nan_policy])Computes the coefficient of variation, the ratio of the biased standard deviation to the mean.
find_repeats(arr)Find repeats and repeat counts.
trim_mean(a, proportiontocut[, axis])Return mean of array after trimming distribution from both tails.
cumfreq(a[, numbins, defaultreallimits, weights])Returns a cumulative frequency histogram, using the histogram function.
histogram2(*args, **kwds)histogram2 is deprecated!
histogram(*args, **kwds)histogram is deprecated!
itemfreq(a)Returns a 2-D array of item frequencies.
percentileofscore(a, score[, kind])The percentile rank of a score relative to a list of scores.
scoreatpercentile(a, per[, limit, …])Calculate the score at a given percentile of the input sequence.
relfreq(a[, numbins, defaultreallimits, weights])Returns a relative frequency histogram, using the histogram function.
binned_statistic(x, values[, statistic, …])Compute a binned statistic for one or more sets of data.
binned_statistic_2d(x, y, values[, …])Compute a bidimensional binned statistic for one or more sets of data.
binned_statistic_dd(sample, values[, …])Compute a multidimensional binned statistic for a set of data.
obrientransform(*args)Computes the O’Brien transform on input data (any number of arrays).
signaltonoise(*args, **kwds)signaltonoise is deprecated!
bayes_mvs(data[, alpha])Bayesian confidence intervals for the mean, var, and std.
mvsdist(data)‘Frozen’ distributions for mean, variance, and standard deviation of data.
sem(a[, axis, ddof, nan_policy])Calculates the standard error of the mean (or standard error of measurement) of the values in the input array.
zmap(scores, compare[, axis, ddof])Calculates the relative z-scores.
zscore(a[, axis, ddof])Calculates the z score of each value in the sample, relative to the sample mean and standard deviation.
iqr(x[, axis, rng, scale, nan_policy, …])Compute the interquartile range of the data along the specified axis.
sigmaclip(a[, low, high])Iterative sigma-clipping of array elements.
threshold(*args, **kwds)threshold is deprecated!
trimboth(a, proportiontocut[, axis])Slices off a proportion of items from both ends of an array.
trim1(a, proportiontocut[, tail, axis])Slices off a proportion from ONE end of the passed array distribution.
f_oneway(*args)Performs a 1-way ANOVA.
pearsonr(x, y)Calculates a Pearson correlation coefficient and the p-value for testing non-correlation.
spearmanr(a[, b, axis, nan_policy])Calculates a Spearman rank-order correlation coefficient and the p-value to test for non-correlation.
pointbiserialr(x, y)Calculates a point biserial correlation coefficient and its p-value.
kendalltau(x, y[, initial_lexsort, nan_policy])Calculates Kendall’s tau, a correlation measure for ordinal data.
weightedtau(x, y[, rank, weigher, additive])Computes a weighted version of Kendall’s ┱┱.
linregress(x[, y])Calculate a linear least-squares regression for two sets of measurements.
theilslopes(y[, x, alpha])Computes the Theil-Sen estimator for a set of points (x, y).
f_value(*args, **kwds)f_value is deprecated!
ttest_1samp(a, popmean[, axis, nan_policy])Calculates the T-test for the mean of ONE group of scores.
ttest_ind(a, b[, axis, equal_var, nan_policy])Calculates the T-test for the means of two independent samples of scores.
ttest_ind_from_stats(mean1, std1, nobs1, …)T-test for means of two independent samples from descriptive statistics.
ttest_rel(a, b[, axis, nan_policy])Calculates the T-test on TWO RELATED samples of scores, a and b.
kstest(rvs, cdf[, args, N, alternative, mode])Perform the Kolmogorov-Smirnov test for goodness of fit.
chisquare(f_obs[, f_exp, ddof, axis])Calculates a one-way chi square test.
power_divergence(f_obs[, f_exp, ddof, axis, …])Cressie-Read power divergence statistic and goodness of fit test.
ks_2samp(data1, data2)Computes the Kolmogorov-Smirnov statistic on 2 samples.
mannwhitneyu(x, y[, use_continuity, alternative])Computes the Mann-Whitney rank test on samples x and y.
tiecorrect(rankvals)Tie correction factor for ties in the Mann-Whitney U and Kruskal-Wallis H tests.
rankdata(a[, method])Assign ranks to data, dealing with ties appropriately.
ranksums(x, y)Compute the Wilcoxon rank-sum statistic for two samples.
wilcoxon(x[, y, zero_method, correction])Calculate the Wilcoxon signed-rank test.
kruskal(*args, **kwargs)Compute the Kruskal-Wallis H-test for independent samples
friedmanchisquare(*args)Computes the Friedman test for repeated measurements
combine_pvalues(pvalues[, method, weights])Methods for combining the p-values of independent tests bearing upon the same hypothesis.
ss(*args, **kwds)ss is deprecated!
square_of_sums(*args, **kwds)square_of_sums is deprecated!
jarque_bera(x)Perform the Jarque-Bera goodness of fit test on sample data.
ansari(x, y)Perform the Ansari-Bradley test for equal scale parameters
bartlett(*args)Perform Bartlett’s test for equal variances
levene(*args, **kwds)Perform Levene test for equal variances.
shapiro(x[, a, reta])Perform the Shapiro-Wilk test for normality.
anderson(x[, dist])Anderson-Darling test for data coming from a particular distribution
anderson_ksamp(samples[, midrank])The Anderson-Darling test for k-samples.
binom_test(x[, n, p, alternative])Perform a test that the probability of success is p.
fligner(*args, **kwds)Perform Fligner-Killeen test for equality of variance.
median_test(*args, **kwds)Mood’s median test.
mood(x, y[, axis])Perform Mood’s test for equal scale parameters.
boxcox(x[, lmbda, alpha])Return a positive dataset transformed by a Box-Cox power transformation.
boxcox_normmax(x[, brack, method])Compute optimal Box-Cox transform parameter for input data.
boxcox_llf(lmb, data)The boxcox log-likelihood function.
entropy(pk[, qk, base])Calculate the entropy of a distribution for given probability values.
chisqprob(*args, **kwds)chisqprob is deprecated!
betai(*args, **kwds)betai is deprecated!

Circular statistical functions

Contingency table functions

Plot-tests

Masked statistics functions

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值