![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
InverseGaussian(μ, λ) / Wald family implementation: mean μ > 0, shape λ > 0.
More...
#include "DistributionCommon.h"#include <algorithm>#include <cmath>#include <memory>#include <optional>#include <random>#include <string>#include <utility>#include <vector>
Go to the source code of this file.
Namespaces | |
| namespace | provsql |
InverseGaussian(μ, λ) / Wald family implementation: mean μ > 0, shape λ > 0.
The first-passage time of Brownian motion with drift: a positive, right-skewed family widely used for reliability and reaction-time models. Its CDF has a closed form in terms of the standard normal Φ, so \(P(X < c)\) and the numeric quantile are analytic; all raw moments are finite (a finite-sum closed form). Positive scalings map c·IG(μ, λ) = IG(cμ, cλ), and a sum of independent inverse Gaussians that share the ratio λ/μ² folds to a single inverse Gaussian in the simplifier (registered as a closure rule below).
Self-contained family implementation: the class is file-local and reaches the evaluators only through the registrars at the bottom (DistributionRegistry factory + sum-closure rule). No evaluator or parser code changes.
Definition in file inverse_gaussian.cpp.