Skip to main content

StatPilot 🧭

Automated, transparent statistical analysis for researchers.

PyPI Version Python Version License: MIT Developed by AuthBrain GitHub Repo CI Build

Developed by AuthBrain • Created & Maintained by Md Mehedi Hassan


🌟 Overview

StatPilot simplifies statistical workflows for data scientists and academic researchers by automating group comparisons.

Instead of manually checking assumptions across multiple statistical software tools, StatPilot evaluates your dataset's distribution, runs assumption diagnostics (Shapiro-Wilk normality and Levene's test for variance homogeneity), selects the appropriate parametric or non-parametric test, computes effect sizes, and outputs a transparent, audit-ready report.

Key Features

  • 🧠 Automated Decision Engine: Picks the right test based on group count, pairing, normality, and variance.
  • 🔍 Transparent Diagnostics: Documents why a test was chosen with step-by-step reasoning.
  • 📊 Rich Terminal Summaries & Plots: Clean terminal tables via Rich, and publication-ready distribution plots via Seaborn.
  • 📄 Publication-Ready Markdown Reports: Export full statistical write-ups directly for academic manuscripts.
  • 🛠️ CLI & Python API: Use StatPilot seamlessly in Python scripts, Jupyter notebooks, or directly from the terminal.

🔗 Quick Links


🚀 Quick Start

Installation

Install StatPilot via pip:

pip install statpilot

💻 Python API Usage

import pandas as pd
from statpilot import compare

# 1. Load your tabular data
df = pd.read_csv("my_experimental_data.csv")

# 2. Run automated statistical comparison
result = compare(df, target="response_time", group="treatment_group")

# 3. View terminal summary table with reasoning
result.summary()

# 4. Display distribution and boxplot graphics
result.plot()

# 5. Generate Markdown report for manuscript submission
report_md = result.to_report()
print(report_md)

Working with Built-in Datasets

StatPilot comes with standard benchmark datasets for immediate testing:

from statpilot.datasets import load_penguins, load_iris
from statpilot import compare

# Load penguins dataset
df = load_penguins()

# Compare flipper length across species
result = compare(df, target="flipper_length_mm", group="species")
result.summary()

🖥️ Command Line Interface (CLI)

StatPilot provides a full-featured CLI tool:

# Compare two groups from a CSV file
statpilot compare --data research_data.csv --target score --group condition

# Save an automated Markdown report to disk
statpilot compare --data research_data.csv --target score --group condition --report report.md

# Paired analysis for repeated measurements
statpilot compare --data pre_post_data.csv --target value --group timepoint --paired

📊 Decision Matrix

StatPilot automates assumption testing and selects tests according to standard statistical decision trees:

Group Count Paired / Repeated Normality (Shapiro-Wilk) Equal Variance (Levene's) Test Selected Effect Size Metric
2 Groups No Normal ($\alpha=0.05$) Equal ($\alpha=0.05$) Independent Samples t-test Cohen's d
2 Groups No Normal ($\alpha=0.05$) Unequal ($\alpha<0.05$) Welch's t-test Cohen's d
2 Groups No Non-Normal ($\alpha<0.05$) N/A Mann-Whitney U Rank-Biserial r
2 Groups Yes Normal ($\alpha=0.05$) N/A Paired Samples t-test Cohen's d
2 Groups Yes Non-Normal ($\alpha<0.05$) N/A Wilcoxon Signed-Rank Rank-Biserial r
3+ Groups No Normal ($\alpha=0.05$) Equal ($\alpha=0.05$) One-Way ANOVA Eta-squared ($\eta^2$)
3+ Groups No Non-Normal / Heterogeneous N/A Kruskal-Wallis H Epsilon-squared ($\epsilon^2$)

🤝 How to Contribute

Contributions are warmly welcomed! You can contribute code, documentation, bug fixes, or new statistical methods.

Step-by-Step Contribution Guide

  1. Fork the GitHub Repository: Navigate to https://github.com/mhashiq/statpilot and click Fork.

  2. Clone your fork locally:

    git clone https://github.com/mhashiq/statpilot.git
    cd statpilot
    
  3. Set up a development environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    pip install -e ".[dev]"
    
  4. Make changes and run tests:

    pytest
    ruff check .
    ruff format .
    
  5. Submit a Pull Request: Push your changes to a feature branch on your fork and open a Pull Request against main.

For more details, check out our full CONTRIBUTING.md guide.


👥 Authors & Organization Credits


📄 License

StatPilot is open-source software licensed under the MIT License.

Download files

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

Source Distribution

statpilot-1.1.0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

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

statpilot-1.1.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file statpilot-1.1.0.tar.gz.

File metadata

  • Download URL: statpilot-1.1.0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.1

File hashes

Hashes for statpilot-1.1.0.tar.gz
Algorithm Hash digest
SHA256 03264be0c50edff5fc51a750d1792679793ef6d1b4785bf1d6530f6f36b469d5
MD5 6a4d7c59d5ea9569560892e10f309e77
BLAKE2b-256 3232a8dc2455680768036ee914b738f464059c255b63ead3af30be6282548049

See more details on using hashes here.

File details

Details for the file statpilot-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: statpilot-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.1

File hashes

Hashes for statpilot-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87a183c2239eb1d3ad84be898b53e915e5275506d81020ed0672f3c4f6fbc7ef
MD5 6a1e756f16ab9045d5f8f1360b76af72
BLAKE2b-256 0468c4b4a334177c96703ffb408c4a77d4a5234278e438fcbf7852dec7eb3ba9

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