1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

""" 

========================================== 

Statistical functions (:mod:`scipy.stats`) 

========================================== 

 

.. module:: scipy.stats 

 

This module contains a large number of probability distributions as 

well as a growing library of statistical functions. 

 

Each univariate distribution is an instance of a subclass of `rv_continuous` 

(`rv_discrete` for discrete distributions): 

 

.. autosummary:: 

:toctree: generated/ 

 

rv_continuous 

rv_discrete 

rv_histogram 

 

Continuous distributions 

======================== 

 

.. autosummary:: 

:toctree: generated/ 

 

alpha -- Alpha 

anglit -- Anglit 

arcsine -- Arcsine 

argus -- Argus 

beta -- Beta 

betaprime -- Beta Prime 

bradford -- Bradford 

burr -- Burr (Type III) 

burr12 -- Burr (Type XII) 

cauchy -- Cauchy 

chi -- Chi 

chi2 -- Chi-squared 

cosine -- Cosine 

crystalball -- Crystalball 

dgamma -- Double Gamma 

dweibull -- Double Weibull 

erlang -- Erlang 

expon -- Exponential 

exponnorm -- Exponentially Modified Normal 

exponweib -- Exponentiated Weibull 

exponpow -- Exponential Power 

f -- F (Snecdor F) 

fatiguelife -- Fatigue Life (Birnbaum-Saunders) 

fisk -- Fisk 

foldcauchy -- Folded Cauchy 

foldnorm -- Folded Normal 

frechet_r -- Deprecated. Alias for weibull_min 

frechet_l -- Deprecated. Alias for weibull_max 

genlogistic -- Generalized Logistic 

gennorm -- Generalized normal 

genpareto -- Generalized Pareto 

genexpon -- Generalized Exponential 

genextreme -- Generalized Extreme Value 

gausshyper -- Gauss Hypergeometric 

gamma -- Gamma 

gengamma -- Generalized gamma 

genhalflogistic -- Generalized Half Logistic 

gilbrat -- Gilbrat 

gompertz -- Gompertz (Truncated Gumbel) 

gumbel_r -- Right Sided Gumbel, Log-Weibull, Fisher-Tippett, Extreme Value Type I 

gumbel_l -- Left Sided Gumbel, etc. 

halfcauchy -- Half Cauchy 

halflogistic -- Half Logistic 

halfnorm -- Half Normal 

halfgennorm -- Generalized Half Normal 

hypsecant -- Hyperbolic Secant 

invgamma -- Inverse Gamma 

invgauss -- Inverse Gaussian 

invweibull -- Inverse Weibull 

johnsonsb -- Johnson SB 

johnsonsu -- Johnson SU 

kappa4 -- Kappa 4 parameter 

kappa3 -- Kappa 3 parameter 

ksone -- Kolmogorov-Smirnov one-sided (no stats) 

kstwobign -- Kolmogorov-Smirnov two-sided test for Large N (no stats) 

laplace -- Laplace 

levy -- Levy 

levy_l 

levy_stable 

logistic -- Logistic 

loggamma -- Log-Gamma 

loglaplace -- Log-Laplace (Log Double Exponential) 

lognorm -- Log-Normal 

lomax -- Lomax (Pareto of the second kind) 

maxwell -- Maxwell 

mielke -- Mielke's Beta-Kappa 

moyal -- Moyal 

nakagami -- Nakagami 

ncx2 -- Non-central chi-squared 

ncf -- Non-central F 

nct -- Non-central Student's T 

norm -- Normal (Gaussian) 

norminvgauss -- Normal Inverse Gaussian 

pareto -- Pareto 

pearson3 -- Pearson type III 

powerlaw -- Power-function 

powerlognorm -- Power log normal 

powernorm -- Power normal 

rdist -- R-distribution 

reciprocal -- Reciprocal 

rayleigh -- Rayleigh 

rice -- Rice 

recipinvgauss -- Reciprocal Inverse Gaussian 

semicircular -- Semicircular 

skewnorm -- Skew normal 

t -- Student's T 

trapz -- Trapezoidal 

triang -- Triangular 

truncexpon -- Truncated Exponential 

truncnorm -- Truncated Normal 

tukeylambda -- Tukey-Lambda 

uniform -- Uniform 

vonmises -- Von-Mises (Circular) 

vonmises_line -- Von-Mises (Line) 

wald -- Wald 

weibull_min -- Minimum Weibull (see Frechet) 

weibull_max -- Maximum Weibull (see Frechet) 

wrapcauchy -- Wrapped Cauchy 

 

Multivariate distributions 

========================== 

 

.. autosummary:: 

:toctree: generated/ 

 

multivariate_normal -- Multivariate normal distribution 

matrix_normal -- Matrix normal distribution 

dirichlet -- Dirichlet 

wishart -- Wishart 

invwishart -- Inverse Wishart 

multinomial -- Multinomial distribution 

special_ortho_group -- SO(N) group 

ortho_group -- O(N) group 

unitary_group -- U(N) group 

random_correlation -- random correlation matrices 

 

Discrete distributions 

====================== 

 

.. autosummary:: 

:toctree: generated/ 

 

bernoulli -- Bernoulli 

binom -- Binomial 

boltzmann -- Boltzmann (Truncated Discrete Exponential) 

dlaplace -- Discrete Laplacian 

geom -- Geometric 

hypergeom -- Hypergeometric 

logser -- Logarithmic (Log-Series, Series) 

nbinom -- Negative Binomial 

planck -- Planck (Discrete Exponential) 

poisson -- Poisson 

randint -- Discrete Uniform 

skellam -- Skellam 

zipf -- Zipf 

 

Statistical functions 

===================== 

 

Several of these functions have a similar version in scipy.stats.mstats 

which work for masked arrays. 

 

.. autosummary:: 

:toctree: generated/ 

 

describe -- Descriptive statistics 

gmean -- Geometric mean 

hmean -- Harmonic mean 

kurtosis -- Fisher or Pearson kurtosis 

kurtosistest -- 

mode -- Modal value 

moment -- Central moment 

normaltest -- 

skew -- Skewness 

skewtest -- 

kstat -- 

kstatvar -- 

tmean -- Truncated arithmetic mean 

tvar -- Truncated variance 

tmin -- 

tmax -- 

tstd -- 

tsem -- 

variation -- Coefficient of variation 

find_repeats 

trim_mean 

 

.. autosummary:: 

:toctree: generated/ 

 

cumfreq 

itemfreq 

percentileofscore 

scoreatpercentile 

relfreq 

 

.. autosummary:: 

:toctree: generated/ 

 

binned_statistic -- Compute a binned statistic for a set of data. 

binned_statistic_2d -- Compute a 2-D binned statistic for a set of data. 

binned_statistic_dd -- Compute a d-D binned statistic for a set of data. 

 

.. autosummary:: 

:toctree: generated/ 

 

obrientransform 

bayes_mvs 

mvsdist 

sem 

zmap 

zscore 

iqr 

 

.. autosummary:: 

:toctree: generated/ 

 

sigmaclip 

trimboth 

trim1 

 

.. autosummary:: 

:toctree: generated/ 

 

f_oneway 

pearsonr 

spearmanr 

pointbiserialr 

kendalltau 

weightedtau 

linregress 

theilslopes 

 

.. autosummary:: 

:toctree: generated/ 

 

ttest_1samp 

ttest_ind 

ttest_ind_from_stats 

ttest_rel 

kstest 

chisquare 

power_divergence 

ks_2samp 

mannwhitneyu 

tiecorrect 

rankdata 

ranksums 

wilcoxon 

kruskal 

friedmanchisquare 

combine_pvalues 

jarque_bera 

 

.. autosummary:: 

:toctree: generated/ 

 

ansari 

bartlett 

levene 

shapiro 

anderson 

anderson_ksamp 

binom_test 

fligner 

median_test 

mood 

 

.. autosummary:: 

:toctree: generated/ 

 

boxcox 

boxcox_normmax 

boxcox_llf 

 

entropy 

 

.. autosummary:: 

:toctree: generated/ 

 

wasserstein_distance 

energy_distance 

 

Circular statistical functions 

============================== 

 

.. autosummary:: 

:toctree: generated/ 

 

circmean 

circvar 

circstd 

 

Contingency table functions 

=========================== 

 

.. autosummary:: 

:toctree: generated/ 

 

chi2_contingency 

contingency.expected_freq 

contingency.margins 

fisher_exact 

 

Plot-tests 

========== 

 

.. autosummary:: 

:toctree: generated/ 

 

ppcc_max 

ppcc_plot 

probplot 

boxcox_normplot 

 

 

Masked statistics functions 

=========================== 

 

.. toctree:: 

 

stats.mstats 

 

 

Univariate and multivariate kernel density estimation (:mod:`scipy.stats.kde`) 

============================================================================== 

 

.. autosummary:: 

:toctree: generated/ 

 

gaussian_kde 

 

For many more stat related functions install the software R and the 

interface package rpy. 

 

""" 

from __future__ import division, print_function, absolute_import 

 

from .stats import * 

from .distributions import * 

from .morestats import * 

from ._binned_statistic import * 

from .kde import gaussian_kde 

from . import mstats 

from .contingency import chi2_contingency 

from ._multivariate import * 

 

__all__ = [s for s in dir() if not s.startswith("_")] # Remove dunders. 

 

from scipy._lib._testutils import PytestTester 

test = PytestTester(__name__) 

del PytestTester