![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Binomial(n, p) family implementation (discrete). More...
#include "DistributionCommon.h"#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 |
Binomial(n, p) family implementation (discrete).
A discrete, integer-valued family in the otherwise-continuous Distribution hierarchy, instantiated only for a latent (token-parameterised) leaf – provsql.binomial(integer, random_variable) – the literal constructor enumerates an exact categorical instead. As for poisson, a parametric leaf is declined by parse_distribution_spec, so no continuous-analytic path integrates its pdf as a density: it is reached only by the Monte Carlo sample(), by observe (weight pdf = pmf at the datum), and by the moment path.
p1 = n (number of trials), p2 = p (success probability).
Definition in file binomial.cpp.