ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
weibull.cpp File Reference

Weibull(k, λ) family implementation: shape k > 0, scale λ > 0 (the 63.2% quantile – NOT a rate; k = 1 is Exponential with rate 1/λ, and the SQL constructor routes that case through exponential). More...

#include "DistributionCommon.h"
#include <algorithm>
#include <cmath>
#include <memory>
#include <optional>
#include <random>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for weibull.cpp:

Go to the source code of this file.

Namespaces

namespace  provsql

Detailed Description

Weibull(k, λ) family implementation: shape k > 0, scale λ > 0 (the 63.2% quantile – NOT a rate; k = 1 is Exponential with rate 1/λ, and the SQL constructor routes that case through exponential).

The workhorse of reliability / survival analysis: k tunes the hazard (infant mortality for k < 1, wear-out for k > 1). \((X/\lambda)^k\) is a unit exponential, which gives an exact quantile, a same-shape comparator closed form, closed-form truncated moments through the regularised incomplete gamma, and a min-stability order statistic (the min of n i.i.d. Weibulls is Weibull at scale \(\lambda n^{-1/k}\)).

Self-contained family implementation: the class is file-local and reaches the evaluators only through the registrars at the bottom.

Definition in file weibull.cpp.