skillfed

scikit-posthocs

Statistical post-hoc analysis and outlier detection algorithms

scikit-posthocs v0.14.0 146.6K downloads/30d#11,093 on PyPI386
Permissive 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) Active released

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-posthocs

uv

uv add scikit-posthocs

poetry

poetry add scikit-posthocs

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: Mathematics

Tags

post hoc statistical testspairwise multiple comparisonsANOVA follow-up analysisnon-parametric tests pythonstatistical significance testinggroup comparison testsp-value adjustment methods
statisticshypothesis-testinganova

More Information Analysis packages