← All packages

Numerics & statistics

star-sigma 0.1.0

What "n sigma" means in one, two and three dimensions

Public state: Released & Verified. The registry label is RELEASED. What the states mean →

Apache-2.0 Released & Verified single file

Summary

Coverage, tail probability and inverse of n sigma for a Gaussian error in one, two and three dimensions, and the normal distribution function and quantile; within 1.9e-13 relative of mpmath at 40 digits and 2.4e-13 of SciPy on 600 cases, tails included; reproduces the published normal and chi-square tables.

Run in your browser

Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).

Runs in the browser: all 12 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.

Use it on your computer

No account and no GitHub needed. Download, then install with one command:

python -m pip install star_sigma-0.1.0-py3-none-any.whl

In Python: import star_sigma

Get started →

Cite it, and its bill of materials

For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.

@software{cavazzini_star_sigma_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-sigma}: What "n sigma" means in one, two and three dimensions},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_sigma/},
  note    = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}

For developers

Install directly from the public repository:

python -m pip install "star-sigma @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_sigma"

README · tests · evidence (GitHub)

Technical sheet

Package
star-sigma
Import name
star_sigma
Version
0.1.0
Licence
Apache-2.0
Python
>=3.9
Dependencies
none (standard library only)
Capability
star.statistics.sigma-coverage
Maturity
Released & Verified (RELEASED)
Published commit
dc09f61d

Requirements

  • R1 normal_cdf, normal_sf, normal_quantile for the standard normal distribution, accurate in both tails. Reproduce the published table values Φ(1), Φ(1.959964), Φ(2.575829).
  • R2 sigma_coverage(n, dims) and sigma_tail(n, dims) for dims 1, 2, 3 (the chi-square law of the squared Mahalanobis distance), each computed directly so that neither loses digits; sigma_for_coverage(p, dims) is the inverse. Reproduce the 68-95-99.7 rule and the published chi-square percentage points for 1, 2 and 3 degrees of freedom.
  • R3 Measured on 600 cases (z to ±37, n from 1e-4 to 12, probabilities from 1e-12 to 1 − 1e-12), as RELATIVE differences: distribution functions and tails within 1.9e-13 of mpmath at 40 digits and 2.4e-13 of SciPy; coverage within 8e-16 of mpmath; the inverses reproduce the requested tail probability within 1.3e-14.
  • R4 Every function returns a finite float or raises ValueError: non-numeric, boolean, NaN or infinite input, z beyond ±38, n outside [0, 38], a probability outside the open or half-open interval stated, dims not 1, 2 or 3.

Limits (what is not claimed)

A Gaussian error with a known covariance: real orbit-determination errors are often not Gaussian and the covariance is often optimistic, so these probabilities are those of the model, not of the truth. No collision probability: that needs the geometry of the encounter. Dimensions 1, 2 and 3 only. The 1.9e-13 relative error in the far tails comes from the platform's erfc. A coverage given as 1 − 1e-17 cannot be distinguished from 1: use the tail.

Release gate

Computed by the registry from the result files, with the same function that decides RELEASED.

Mutation score, latest measure of each module (needs at least 0.850)
  • star_sigma.py 0.931 (2026-10-06)
Independent implementations written by others (needs 2)
mpmath at 40 digits (ncdf, incomplete gamma), scipy.stats norm / chi2 (double precision)
Also compared with, not counted
published values: tables of the normal distribution
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Unit testsVERIFIED2026-10-0612 passed in 0.33s
ReviewVERIFIED2026-10-06Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed
ReviewVERIFIED2026-10-06Re-running the cross-check gives a byte-identical evidence file
Reference valueVERIFIED2026-10-060.68268949, 0.95449974, 0.99730020; 0.97500000: within 1e-8 of the printed values (suite: 12 passed in 0.33s)
Cross-check with independent librariesVERIFIED2026-10-06star_sigma gives the coverage and the tail of n sigma in 1, 2 and 3 dimensions, and their inverses, to the accuracy of double precision, tails included
BenchmarkVERIFIED2026-10-06mpmath: direct 1.8e-13, inverse residual 1.3e-14
Clean install from the release tagVERIFIED2026-10-06pytest outside the tree: 12 passed in 0.18s

Fingerprints (SHA-256)

star_sigma-0.1.0-py3-none-any.whlde41f1e657714cc9b203a8709a6d67b0b9258776692de7d2a056addc4464aa50
star_sigma.py84ed2154cc1d8d7a7df7f4075731af5eff78ed90034aeb5906540a7550a7e748
star_sigma-0.1.0-source.zipf620b45bad6df2b46a15724d682ba2e22c2c6465639a14b20956b16c2692efea

results