How PGM-Q is validated

PGM LLC · Last updated 26 September 2026 · Version 1.0.1

If you are going to put a Cpk in front of a customer, you are entitled to ask where the number came from. This page says exactly that.

The approach. Every statistical routine in PGM-Q has automated tests that compare its output against an independent implementation — SciPy 1.17.1 and NumPy 2.4.4 — on synthetic datasets committed alongside the code. The expected values were computed once in Python and written into the repository as fixtures. The tests run on every change, and a drift beyond the stated tolerance fails the build. A further 28 tests are regression locks rather than comparisons: they pin the simulation's output for fixed models and seeds, so a refactor cannot quietly change an answer a saved scenario has already been given. None of their expected values has ever been re-recorded.

Test counts in this build

Methods, references and tolerances

Method Published reference Asserted tolerance
Control-chart constants (d2, c4, A2, D3, D4) NIST/SEMATECH e-Handbook of Statistical Methods §6.3.2 Sigma estimates to 1e-6 of the reference
Cp, Cpk, Pp, Ppk; PPM; sigma level; yield Standard definitions; reference values from SciPy 1.17.1 Indices 1e-4; PPM 0.5 parts per million
Normal CDF Abramowitz & Stegun 7.1.26 Round-trip against the inverse to 1e-6
Inverse normal CDF Acklam's algorithm Round-trip to 1e-6 across p = 0.001 … 0.999
Anderson–Darling normality Stephens (1974); p-value adjustment D'Agostino & Stephens (1986) A² and A*² to 1e-4; p-value to 1e-3
Non-normal capability, percentile method ISO 22514-4 — indices from the fitted 0.135% and 99.865% points See the three fits below
Box-Cox transform, λ by maximum likelihood Box & Cox (1964); golden-section search on the log-likelihood λ 2e-3; μ 5e-3; σ 2e-3; percentiles 2e-4
Lognormal fit, maximum likelihood Standard MLE, n-denominator, as SciPy μ and σ to 1e-6; percentiles 1e-6
Weibull fit, 2-parameter maximum likelihood Standard MLE; shape by bisection on the likelihood equation Shape 1e-3; scale 1e-5; percentiles 1e-5
Random number generator xoshiro128** and SplitMix — Blackman & Vigna, public domain Uniform mean 0.005; normal mean and standard deviation 0.01
Gamma sampler (used for PERT) Marsaglia & Tsang (2000) Moments against analytic values, 0.03–0.5
Beta-PERT distribution Malcolm et al. (1959); Vose Mean 0.04, variance 0.5 over 200,000 draws
Percentiles NumPy linear interpolation method 1e-9
Spearman rank correlation (tornado ordering) Standard rank correlation, ties averaged 1e-6

Test data

The fixtures are synthetic and generated with a fixed seed, so anyone can reproduce them. The capability fixture is 25 subgroups of 4 drawn from a normal distribution (numpy.random.seed(42), mean 10.005, standard deviation 0.02, rounded to four decimals). The non-normal fixture is lognormal data with seed 11, representing a flatness characteristic. No real part data from any customer is used anywhere in the tests.

What PGM-Q does not do

Being straight about the boundaries is part of the validation:

On comparisons with other software

PGM-Q agrees with independent implementations to the tolerances stated above. That is a different claim from being equivalent to any particular commercial package: other tools make their own choices about estimator conventions, percentile definitions and transform selection, and small differences in those choices produce small differences in the result. Where a number matters, compare it against your own reference and satisfy yourself.

Reporting a discrepancy

If you find a result you believe is wrong, send the input data and what you expected to support@phasegatemanager.com. A reproducible numerical defect is treated as the most serious kind of bug in this application.