scikit-posthocs
Statistical post-hoc analysis and outlier detection algorithms
What it is and what it does
scikit-posthocs fills a gap in Python's statistical ecosystem by offering a comprehensive suite of post hoc tests for pairwise multiple comparisons—the follow-up analysis performed after ANOVA or similar omnibus tests reveal statistical significance. It implements both parametric tests (like TukeyHSD and Scheffe) and non-parametric alternatives (like Dunn and Nemenyi tests) for different experimental designs, plus outlier detection methods and basic plotting. The package is tightly integrated with pandas DataFrames and NumPy arrays, making it convenient to work with typical data science workflows.
You would use this package when you've run an ANOVA or Kruskal-Wallis test and need to determine which specific group pairs differ significantly. It handles p-value adjustment automatically to control for multiple comparisons, and it supports both factorial and block designs. The package depends on scipy, statsmodels, pandas, seaborn, and matplotlib, so it fits naturally into existing scientific Python environments.
Use it for:
- Run post hoc pairwise comparisons after ANOVA to identify which group means differ significantly.
- Apply non-parametric post hoc tests (Dunn, Nemenyi) when data violates normality assumptions.
- Detect outliers in datasets using Grubbs, Tietjan-Moore, or ESD tests before analysis.
- Generate significance plots to visualize pairwise comparison results for reports or publications.
- Adjust p-values across multiple comparisons to control Type I error rates in exploratory studies.
- Analyze block design experiments using specialized tests like Durbin-Conover or Quade.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides post hoc statistical tests for pairwise multiple comparisons after ANOVA, including parametric tests (Scheffe, Student T, Tamhane T2, TukeyHSD) and non-parametric tests (Dunn, Nemenyi, Mann-Whitney, Wilcoxon) with p-value adjustment and outlier detection.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and fills a genuine gap in Python's statistical toolkit by providing post hoc tests that are either missing or inconvenient in scipy and statsmodels. Install friction is low, and it integrates well with standard data science libraries. Recommended for researchers, statisticians, and data analysts working with group comparisons.
Install
scikit-posthocs on PyPI
pip
pip install scikit-posthocsuv
uv add scikit-posthocspoetry
poetry add scikit-posthocsInstalling scikit-posthocs
Before you install
Low friction install with six standard scientific dependencies (numpy, scipy, statsmodels, pandas, seaborn, matplotlib). Package is actively maintained with a recent commit on 2026-07-24 and has been in production since 2018-02-01.
License in practice
MIT license (permissive) allows free use, modification, and distribution with minimal restrictions—suitable for academic, commercial, and open-source projects.
Quickstart
pip install scikit-posthocs
import scikit_posthocs as sp
import pandas as pd
# After ANOVA, perform post hoc test on groups
result = sp.posthoc_tukey(data, val_col='values', group_col='groups')
Requires Python 3.9 or later; all six runtime dependencies (numpy, scipy, statsmodels, pandas, seaborn, matplotlib) must be installed.
Verify before relying
- Whether the package supports effect size calculations or confidence intervals alongside p-values.
- Performance characteristics when handling large datasets or many groups.
- Specific visualization capabilities beyond 'significance plots' mentioned in the description.
Package facts
| License | Copyright (c) 2026 Maksim Terpilovskii Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — numpy, scipy, statsmodels, pandas, seaborn, matplotlib |
| Maintenance | actively maintained — 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 146,623/month — #11,093 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: scikit_posthocs-0.14.0-py3-none-any.whl
Keywords: statistics, stats, posthoc, anova, data science
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
pingouinPingouin provides a comprehensive statistical…
copyleft · top 15,000 on PyPI
pymannkendallImplements a suite of Mann-Kendall trend tests…
permissive · top 15,000 on PyPI
statsmodelsstatsmodels provides statistical models,…
permissive · top 1,000 on PyPI
hyppohyppo provides multivariate hypothesis testing…
permissive · top 15,000 on PyPI
allpairspyGenerates minimal test case combinations using…
permissive · top 15,000 on PyPI
rupturesDetects change points in time series and signal…
permissive · top 5,000 on PyPI
anova-wifiCommunicate with Anova precision cookers over…
permissive · top 15,000 on PyPI
diptestComputes Hartigan's dip test statistic and…
copyleft · top 15,000 on PyPI
pydoePyDOE constructs experimental designs for…
permissive · top 5,000 on PyPI
pyDOE3pyDOE3 provides functions to construct…
permissive · top 15,000 on PyPI