Skip to main content

Ministats

image Documentation Status

ministats is lightweight Python for learning statistics that includes helper functions for data analysis, probability visualizations, and statistical analysis procedures. The goal is to show code implementations of the standard stats procedures used in STATS 101 courses that are easy to understand for Python beginners.

  • Docs: ministats.readthedocs.io
  • Features:
    • Code implementations from scratch that closely match the math calculations.
    • Leverages probability distributions defined in scipy.stats.
    • Includes both classical analytical approximation methods like t-tests and modern methods like simulations, bootstrap estimation, and permutation tests.
  • Free software: MIT license

Installation

To install the ministats library, run the following command in a terminal:

$ python -m pip install ministats

To use ministats inside a Jupyter notebook or Colab notebook, run the following %-magic command in a code cell:

%pip install ministats

Quickstart

INSERT NOTEBOOK quickstart.ipynb AS MARKDOWN SOURCE

Textbook

The ministats library was developed as the support code for the No Bullshit Guide to Statistics, which is an intro-to-stats textbook that uses a computational approach to teaching probability and statistics concepts. The book explains concepts using words, math formulas, visualizations, and code examples. The ministats library contains implementations of all the statistical procedures discussed in the book written as concise, easy-to-read Python code.

To learn more about the book, consult the links below:

Computational notebooks

To see examples of the ministats library in action, you can check out the computational notebooks that accompany the book.

Roadmap

Here are some tasks I need to take care of before the v1.0 release, which will be the version that accompanies the first edition of the No Bullshit Guide to Statistics:

  • add text
  • finish adding docs/
  • move plots/figures.py plotting functions to plots/book/figures.py
  • remove plots/figures plotting functions from ministats namespace
  • add more statistical tests:
    • chi-square tests for categorical data
    • one-sample equivalence test
    • two-sample equivalence test
  • add more tests

Testing

The statistical procedures implemented in the ministats library are tested against the functions from scipy.stats and statsmodels to make sure they give the same answers.

History

0.5.20 (2026-10)

  • Latest version including lots of updates based on Reading Group feedback.

0.2.0 (2023-03-28)

  • Imported plotting functions from plot_helpers.py (in main namespace for now)

0.1.0 (2023-06-29)

  • First release on PyPI.

Metadata

Release files for ministats 0.5.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ministats 0.5.21
File Size Uploaded Provenance
ministats-0.5.21.tar.gz 68.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ministats 0.5.21
File Interpreter ABI Platform
ministats-0.5.21-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 133.8 kB

Release files / ministats-0.5.21.tar.gz

Download URL ministats-0.5.21.tar.gz
Size 68.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f2205087f0eda5363e8534a55823f4e4f8908cabcc04fa4e225db3e0a1bdd9a4
BLAKE2b-256 checksum
How to use checksums
b05b18c2ecc7a6d16cd300d98aa00e258b4def8f66202fb3b782d6099d9ad22e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / ministats-0.5.21-py2.py3-none-any.whl

Download URL ministats-0.5.21-py2.py3-none-any.whl
Size 65.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bd3858ab4e9de48a035cbf0f0b2503285e26a162d6994e10779694efcff03ecd
BLAKE2b-256 checksum
How to use checksums
7429606fb9392acb4ef1d68e56ae93b3dc07f3ba055ac3698417c690514aff2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for ministats 0.5.21

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.21 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page