Skip to main content

Statistical tools for scientists

Project description

StatisticsForScientists

StatisticsForScientists is a small Python project plus companion paper "From Estimands to Inference: A Practical Tutorial for Robust Statistical Analysis in Scientific Papers" for teaching practical statistical inference with an estimand-first perspective.

The repository includes:

  • inferential_stats.py: the main lightweight analysis module
  • examples.py: reproducible worked examples used in the paper
  • tests/: unit tests for the statistical helpers and reporting functions
  • latex/estimands_to_inference_tutorial.tex: the source of the tutorial paper
  • latex/estimands_to_inference_tutorial.pdf: the compiled PDF version of the paper

Disclaimer: It's a Work In Progress!

It's a new project I've been working on in my spare time; there are still many concepts that need to be presented. For example, paired/repeated-measures analyses, regression, contingency tables, ANOVA / mixed models, etc.

Paper

The tutorial manuscript is available here:

Installation

Create or activate your environment, then install the required dependencies:

pip install -r requirements.txt

Run The Examples

The paper's worked examples are implemented in examples.py. Please refer to this file for guidalines on how to use module inferential_stats.py.

python3 examples.py

Useful options:

  • python examples.py --show-data prints the raw datasets used in the paper
  • python examples.py --json emits machine-readable results for all worked examples

Run The Tests

python3 -m unittest discover -s tests

Rebuild The Paper

From the latex/ directory:

pdflatex -interaction=nonstopmode -halt-on-error estimands_to_inference_tutorial.tex
bibtex estimands_to_inference_tutorial
pdflatex -interaction=nonstopmode -halt-on-error estimands_to_inference_tutorial.tex
pdflatex -interaction=nonstopmode -halt-on-error estimands_to_inference_tutorial.tex

This produces latex/estimands_to_inference_tutorial.pdf.

Acknowledgments

My warmest thanks to Josh Starmer, the author of StatQuest YouTube channel and Tang et al., the authors of the paper Misuse, Misreporting, Misinterpretation of Statistical Methods in Usable Privacy and Security Papers.

Your journey continues with these two resources.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stats4science-1.0.0.tar.gz (279.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stats4science-1.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file stats4science-1.0.0.tar.gz.

File metadata

  • Download URL: stats4science-1.0.0.tar.gz
  • Upload date:
  • Size: 279.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for stats4science-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4bb93b20306e6877be37c0822962fb2800684cb9003db70eac734296692bb1b0
MD5 3fdb03ec4a403562b8caef0a602ac240
BLAKE2b-256 dc69aaac077570e406c0bb6b3c40b4ca04bcb60c9bb89b15fb154b8bf761228b

See more details on using hashes here.

File details

Details for the file stats4science-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: stats4science-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for stats4science-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bff378f31b7cbeb7e1667c8b6c501d1236c72581eea40348ef79d0bc68a0d667
MD5 b0858bc9b78e190696243b0a74c56466
BLAKE2b-256 f7f8ec797c02cf971d058df368814f7c5d1ffc720440a243542bf0844acbdf01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page