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 moduleexamples.py: reproducible worked examples used in the papertests/: unit tests for the statistical helpers and reporting functionslatex/estimands_to_inference_tutorial.tex: the source of the tutorial paperlatex/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-dataprints the raw datasets used in the paperpython examples.py --jsonemits 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bb93b20306e6877be37c0822962fb2800684cb9003db70eac734296692bb1b0
|
|
| MD5 |
3fdb03ec4a403562b8caef0a602ac240
|
|
| BLAKE2b-256 |
dc69aaac077570e406c0bb6b3c40b4ca04bcb60c9bb89b15fb154b8bf761228b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bff378f31b7cbeb7e1667c8b6c501d1236c72581eea40348ef79d0bc68a0d667
|
|
| MD5 |
b0858bc9b78e190696243b0a74c56466
|
|
| BLAKE2b-256 |
f7f8ec797c02cf971d058df368814f7c5d1ffc720440a243542bf0844acbdf01
|