pg_math
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4780 | pg_math | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1.0 | 1817161514 | pg_math | - |
| RPM | PIGSTY | 1.1.0 | 1817161514 | pg_math_$v | - |
| DEB | PIGSTY | 1.1.0 | 1817161514 | postgresql-$v-pg-math | - |
Build
You can build the RPM / DEB packages for pg_math using pig build:
Install
You can install pg_math directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
pg_math: statistical distribution functions using GSL for PostgreSQL
Provides CDF (cumulative distribution) and RDF (random distribution) functions for 31 statistical distributions using the GNU Scientific Library (GSL).
Supported Distributions
Gaussian, Unit Gaussian, Gaussian Tail, Bivariate Gaussian, F-Distribution, Exponential, Laplace, Exponential Power, Cauchy, Rayleigh, Rayleigh Tail, Landau, Gamma, Flat (Uniform), Lognormal, Chi-squared, T-Distribution, Beta, Logistic, Pareto, Weibull, Type-1 Gumbel, Type-2 Gumbel, Poisson, Bernoulli, Binomial, Negative Binomial, Pascal, Geometric, Hypergeometric, Logarithmic.
Function Naming Convention
rdf_<distribution>(...)– random distribution function (PDF value)cdf_<distribution>_p(...)– cumulative distribution P-valuecdf_<distribution>_q(...)– cumulative distribution Q-value (1-P)cdf_<distribution>_pinv(...)– inverse CDF Pcdf_<distribution>_qinv(...)– inverse CDF Q
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)