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

Beta(α, β) family implementation on the unit interval: shapes α, β > 0. More...

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

Go to the source code of this file.

Namespaces

namespace  provsql

Detailed Description

Beta(α, β) family implementation on the unit interval: shapes α, β > 0.

The conjugate prior of Bernoulli / binomial success probabilities and the workhorse of bounded-quantity modelling. The CDF is the regularised incomplete beta \(I_x(\alpha, \beta)\) (continued fraction, file-local); the quantile rides the generic monotone-CDF bisection over the finite [0, 1] support, and truncated moments are closed-form through the moment-shifted incomplete beta. Beta(1, 1) is Uniform(0, 1) and the SQL constructor routes it there.

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

Definition in file beta.cpp.