momentchi2
A collection of methods for computing the cdf of a weighted sum of chi-squared random variables.
Decision gist · record as of 2026-08-14
Yes, if you need a fast approximate CDF for weighted chi-squared sums and can tolerate two to three decimal place accuracy. No, if you require exact results, active maintenance, or modern package support—the project is abandoned (last release 2021-08-27) and may have compatibility issues with current scipy/numpy versions. Suitable for research or one-off analysis, risky for production systems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; numpy and scipy must be installed.
- Low install friction with only numpy and scipy as dependencies.
- However, the package is abandoned—last release was 2021-08-27 with no updates since, so expect no maintenance or bug fixes.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, though you must include the license notice.
last release 2021-08-27 (1813 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 276,649 downloads/mo, #8,161 on PyPI
Alternatives
Verify before relying
pip install momentchi2
from momentchi2 import hbe
import numpy as np
# Compute CDF for weighted chi-squared sum
result = hbe(np.array([1.5, 1.5, 0.5, 0.5]), np.array([0.627, 10.203]))- Whether the package's accuracy claims (two to three decimal places) hold for your specific use case and coefficient configuration.
- Current compatibility with modern scipy and numpy versions, given the package has not been updated since 2021.
What it is and what it does
momentchi2 provides four statistical approximation methods for computing the cumulative distribution function (CDF) of a weighted sum of chi-squared random variables. This is a specialized numerical problem in statistics where exact computation is expensive; the package trades exact accuracy for speed using moment-matching techniques. The four methods—Hall-Buckley-Eagleson, Satterthwaite-Welch, Wood's F, and Lindsay-Pilla-Basak—each have different strengths: Hall-Buckley-Eagleson is recommended for larger coefficient sets (over 100), while Lindsay-Pilla-Basak works better for smaller sets (up to 10). The package wraps scipy and numpy to deliver these approximations.
You call one of the four functions with a coefficient vector and quantile value(s), and it returns the approximate CDF. Input can be a scalar, list, or numpy array; output format matches input format. The Lindsay-Pilla-Basak method accepts a tunable parameter p (default 4) to trade accuracy for speed. The package is a Python port of the R package momentchi2 and is intended for researchers and practitioners who need fast, reasonably accurate CDF approximations rather than exact solutions.
Use it for
- Approximate CDF of weighted chi-squared sums in statistical hypothesis testing or variance component estimation.
- Fast numerical approximation in simulation studies where exact computation would be prohibitively slow.
- Selecting among four moment-matching methods based on the size of your coefficient vector and accuracy requirements.
- Batch evaluation of CDF at multiple quantile points using numpy arrays for vectorized performance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a fast approximate CDF for weighted chi-squared sums and can tolerate two to three decimal place accuracy.
No, if you require exact results, active maintenance, or modern package support—the project is abandoned (last release 2021-08-27) and may have compatibility issues with current scipy/numpy versions. Suitable for research or one-off analysis, risky for production systems.
Install
momentchi2 on PyPI
Before you install
Low install friction with only numpy and scipy as dependencies. However, the package is abandoned—last release was 2021-08-27 with no updates since, so expect no maintenance or bug fixes.
Requires Python 3.6 or later; numpy and scipy must be installed.
License in practice
MIT license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, though you must include the license notice.
Quickstart
pip install momentchi2
from momentchi2 import hbe
import numpy as np
# Compute CDF for weighted chi-squared sum
result = hbe(np.array([1.5, 1.5, 0.5, 0.5]), np.array([0.627, 10.203]))
Verify before relying
- Whether the package's accuracy claims (two to three decimal places) hold for your specific use case and coefficient configuration.
- Current compatibility with modern scipy and numpy versions, given the package has not been updated since 2021.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesscipynumpy |
| Maintenance | Abandoned 1,813 days since the last release |
| First released | |
| Downloads | 276,649 / month, #8,161 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: momentchi2-0.1.8-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “chi-squared weighted sum cdf”
- momentchi2Computes the cumulative distribution function of a weighted sum of…
- cognite-toolkitA command-line tool for configuring, administrating, and deploying…
- cody-specialProvides high-precision implementations of error functions (erf,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also pytensor-distributions · cody-special · runstats · forestci · statistics · powershap · cem · ipfn