Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsscipy.stats is SciPy’s broad statistics toolbox—not a single analysis workflow. It provides tools for describing samples, working with probability distributions, testing hypotheses, and estimating uncertainty with resampling, among other tasks. To use it well, start with your study design and statistical question, then choose and verify a method; tests listed together in the documentation are not necessarily interchangeable.
What you can do with scipy.stats
The SciPy 1.18.0 statistics reference groups functionality around several practical needs. You can use it to:
- Describe data: calculate summary and frequency statistics, quantiles, moments, and z-scores.
- Work with distributions: use continuous, discrete, or multivariate distributions; fit distributions; and work with empirical cumulative distribution functions and survival methods.
- Test hypotheses: analyze one sample, paired or independent groups, associations, goodness of fit, and contingency tables; the package also includes multiple-testing functions.
- Estimate uncertainty or test custom statistics: use bootstrap, permutation, or Monte Carlo procedures.
- Explore specialized methods: use kernel density estimation, quasi-Monte Carlo, directional statistics, sensitivity analysis, or statistical distances where appropriate.
This is a task-based overview, not a complete inventory of the API. The reference also includes masked statistics and newer random-variable interfaces.
Start with the question and study design
Before choosing a function, define what you want to estimate or test. Are you describing a sample, comparing means, examining ranks or distributions, measuring association, assessing fit, or constructing an interval? Then identify whether the data are from one sample, paired observations, or independent groups, and consider the outcome scale and relevant distributional assumptions.
#1 Best Overall
Only then compare candidate methods. Two tests under the same documentation heading may differ in their assumptions, null hypotheses, supported alternatives, confidence-interval options, or calculation method. SciPy explicitly cautions that its test groupings reflect common uses, not equivalence. For the selected function, check the version-specific API documentation for its null hypothesis, assumptions, alternatives, return object, and available options. The reference is the place to confirm exact behavior.
Choose a method that matches the comparison
For a comparison involving two samples, first establish whether observations are linked. Measurements taken from the same people before and after an intervention, for example, are paired; measurements from separate groups are independent. Do not select a test just because its name sounds suitable. Confirm what quantity it addresses and what assumptions its implementation makes.
Rank #2
| Question to resolve | Why it matters |
|---|---|
| Are observations paired, independent, or from one sample? | The study design determines which methods are appropriate; paired and independent-sample tests do not answer the same setup. |
| What is the target? | A mean, rank or distributional difference, association, goodness of fit, and an interval are distinct targets. |
| What assumptions and data types apply? | Candidate tests can make different assumptions even when grouped under a similar use in the reference. |
| How is the result calculated? | Exact, asymptotic, and resampling procedures differ in computation and interpretation. |
| What output do you need? | Check whether the function supports the alternative hypothesis and confidence interval relevant to your question, and understand its return object. |
| Which SciPy version is installed? | API signatures and options can change; check the documentation for the version you use. |
When to use bootstrap, permutation, or Monte Carlo methods
SciPy’s resampling and Monte Carlo tools can reproduce results from many established tests or support tests and intervals for custom statistics. They are useful when a suitable resampling procedure fits the study design and the statistic of interest, but generally require more computation and may produce stochastic results. See the resampling and Monte Carlo reference for the available procedures.
Bootstrap intervals
In a bootstrap procedure, samples are drawn with replacement from the observed data, the statistic is calculated for each resample, and an interval is formed from the resulting bootstrap distribution. SciPy documents this outline in its bootstrap reference. The resampling scheme must reflect how the data were collected: an interval does not by itself validate the study design or account for dependence that the procedure fails to represent.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Permutation and Monte Carlo procedures
These approaches let you assess statistics through resampling or simulation rather than relying only on a conventional calculation. Choose them based on the null question, data structure, and supported alternatives; factor in added computational cost and stochastic results. Consult the exact function reference for its procedure and options rather than assuming all resampling tests work alike.
Learn the workflow, then check the reference
The SciPy statistics tutorial introduces many, but not all, features. It covers distributions, sample statistics and hypothesis tests, resampling and Monte Carlo, kernel density estimation, quasi-Monte Carlo, and test examples. Use it to learn the broad workflow, then consult the API reference for exact function behavior and version-specific details. The tutorial identifies itself as a work in progress, so it should not be treated as exhaustive.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When another Python package may fit better
scipy.stats can sit alongside other packages rather than replace them. The SciPy reference identifies complementary tools for distinct kinds of work:
- statsmodels: regression, linear models, time series, and statistical extensions.
- pandas: tabular data and time-series work.
- PyMC: Bayesian modeling.
- scikit-learn: classification, regression, and model selection.
- Seaborn: statistical visualization.
- rpy2: bridging Python to R.
These are ecosystem choices, not a ranking: select the package according to the analysis you need.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




