1.10.0
User Documentation for MADlib
prob.sql_in File Reference

SQL functions for evaluating probability functions. More...

Functions

float8 bernoulli_cdf (float8 x, float8 sp)
 Bernoulli cumulative distribution function. More...
 
float8 bernoulli_pmf (int4 x, float8 sp)
 Bernoulli probability mass function. More...
 
float8 bernoulli_quantile (float8 p, float8 sp)
 Bernoulli quantile function. More...
 
float8 beta_cdf (float8 x, float8 alpha, float8 beta)
 Beta cumulative distribution function. More...
 
float8 beta_pdf (float8 x, float8 alpha, float8 beta)
 Beta probability density function. More...
 
float8 beta_quantile (float8 p, float8 alpha, float8 beta)
 Beta quantile function. More...
 
float8 binomial_cdf (float8 x, int4 n, float8 sp)
 Binomial cumulative distribution function. More...
 
float8 binomial_pmf (int4 x, int4 n, float8 sp)
 Binomial probability mass function. More...
 
float8 binomial_quantile (float8 p, int4 n, float8 sp)
 Binomial quantile function. More...
 
float8 cauchy_cdf (float8 x, float8 location, float8 scale)
 Cauchy cumulative distribution function. More...
 
float8 cauchy_pdf (float8 x, float8 location, float8 scale)
 Cauchy probability density function. More...
 
float8 cauchy_quantile (float8 p, float8 location, float8 scale)
 Cauchy quantile function. More...
 
float8 chi_squared_cdf (float8 x, float8 df)
 Chi-squared cumulative distribution function. More...
 
float8 chi_squared_pdf (float8 x, float8 df)
 Chi-squared distribution probability density function. More...
 
float8 chi_squared_quantile (float8 p, float8 df)
 Chi-squared distribution quantile function. More...
 
float8 exponential_cdf (float8 x, float8 lambda)
 Exponential cumulative distribution function. More...
 
float8 exponential_pdf (float8 x, float8 lambda)
 Exponential probability density function. More...
 
float8 exponential_quantile (float8 p, float8 lambda)
 Exponential quantile function. More...
 
float8 extreme_value_cdf (float8 x, float8 location, float8 scale)
 Extreme Value cumulative distribution function. More...
 
float8 extreme_value_pdf (float8 x, float8 location, float8 scale)
 Extreme Value probability density function. More...
 
float8 extreme_value_quantile (float8 p, float8 location, float8 scale)
 Extreme Value quantile function. More...
 
float8 fisher_f_cdf (float8 x, float8 df1, float8 df2)
 Fisher F cumulative distribution function. More...
 
float8 fisher_f_pdf (float8 x, float8 df1, float8 df2)
 Fisher F probability density function. More...
 
float8 fisher_f_quantile (float8 p, float8 df1, float8 df2)
 Fisher F quantile function. More...
 
float8 gamma_cdf (float8 x, float8 shape, float8 scale)
 Gamma cumulative distribution function. More...
 
float8 gamma_pdf (float8 x, float8 shape, float8 scale)
 Gamma probability density function. More...
 
float8 gamma_quantile (float8 p, float8 shape, float8 scale)
 Gamma quantile function. More...
 
float8 geometric_cdf (float8 x, float8 sp)
 Geometric cumulative distribution function. More...
 
float8 geometric_pmf (int4 x, float8 sp)
 Geometric probability mass function. More...
 
float8 geometric_quantile (float8 p, float8 sp)
 Geometric quantile function. More...
 
float8 hypergeometric_cdf (float8 x, int4 r, int4 n, int4 N)
 Hypergeometric cumulative distribution function. More...
 
float8 hypergeometric_pmf (int4 x, int4 r, int4 n, int4 N)
 Hypergeometric probability mass function. More...
 
float8 hypergeometric_quantile (float8 p, int4 r, int4 n, int4 N)
 Hypergeometric quantile function. More...
 
float8 inverse_gamma_cdf (float8 x, float8 shape, float8 scale)
 Inverse Gamma cumulative distribution function. More...
 
float8 inverse_gamma_pdf (float8 x, float8 shape, float8 scale)
 Inverse Gamma probability density function. More...
 
float8 inverse_gamma_quantile (float8 p, float8 shape, float8 scale)
 Inverse Gamma quantile function. More...
 
float8 kolmogorov_cdf (float8 x)
 Kolmogorov cumulative distribution function. More...
 
float8 laplace_cdf (float8 x, float8 mean, float8 scale)
 Laplace cumulative distribution function. More...
 
float8 laplace_pdf (float8 x, float8 mean, float8 scale)
 Laplace probability density function. More...
 
float8 laplace_quantile (float8 p, float8 mean, float8 scale)
 Laplace quantile function. More...
 
float8 logistic_cdf (float8 x, float8 mean, float8 scale)
 Logistic cumulative distribution function. More...
 
float8 logistic_pdf (float8 x, float8 mean, float8 scale)
 Logistic probability density function. More...
 
float8 logistic_quantile (float8 p, float8 mean, float8 scale)
 Logistic quantile function. More...
 
float8 lognormal_cdf (float8 x, float8 location, float8 scale)
 Log-normal cumulative distribution function. More...
 
float8 lognormal_pdf (float8 x, float8 location, float8 scale)
 Log-normal probability density function. More...
 
float8 lognormal_quantile (float8 p, float8 location, float8 scale)
 Log-normal quantile function. More...
 
float8 negative_binomial_cdf (float8 x, float8 r, float8 sp)
 Negative binomial cumulative distribution function. More...
 
float8 negative_binomial_pmf (int4 x, float8 r, float8 sp)
 Negative binomial probability mass function. More...
 
float8 negative_binomial_quantile (float8 p, float8 r, float8 sp)
 Negative binomial quantile function. More...
 
float8 non_central_beta_cdf (float8 x, float8 alpha, float8 beta, float8 ncp)
 Noncentral beta cumulative distribution function. More...
 
float8 non_central_beta_pdf (float8 x, float8 alpha, float8 beta, float8 ncp)
 Noncentral beta probability density function. More...
 
float8 non_central_beta_quantile (float8 p, float8 alpha, float8 beta, float8 ncp)
 Noncentral beta quantile function. More...
 
float8 non_central_chi_squared_cdf (float8 x, float8 df, float8 ncp)
 Noncentral chi-squared cumulative distribution function. More...
 
float8 non_central_chi_squared_pdf (float8 x, float8 df, float8 ncp)
 Noncentral chi-squared distribution probability density function. More...
 
float8 non_central_chi_squared_quantile (float8 p, float8 df, float8 ncp)
 Noncentral chi-squared distribution quantile function. More...
 
float8 non_central_f_cdf (float8 x, float8 df1, float8 df2, float8 ncp)
 Noncentral Fisher F cumulative distribution function. More...
 
float8 non_central_f_pdf (float8 x, float8 df1, float8 df2, float8 ncp)
 Noncentral Fisher F probability density function. More...
 
float8 non_central_f_quantile (float8 p, float8 df1, float8 df2, float8 ncp)
 Noncentral Fisher F quantile function. More...
 
float8 non_central_t_cdf (float8 x, float8 df, float8 ncp)
 Noncentral Student-t cumulative distribution function. More...
 
float8 non_central_t_pdf (float8 x, float8 df, float8 ncp)
 Noncentral Student-t probability density function. More...
 
float8 non_central_t_quantile (float8 p, float8 df, float8 ncp)
 Noncentral Student-t quantile function. More...
 
float8 normal_cdf (float8 x, float8 mean=0, float8 sd=1)
 Normal cumulative distribution function. More...
 
float8 normal_cdf (float8 x, float8 mean)
 
float8 normal_cdf (float8 x)
 
float8 normal_pdf (float8 x, float8 mean=0, float8 sd=1)
 Normal probability density function. More...
 
float8 normal_pdf (float8 x, float8 mean)
 
float8 normal_pdf (float8 x)
 
float8 normal_quantile (float8 p, float8 mean=0, float8 sd=1)
 Normal quantile function. More...
 
float8 normal_quantile (float8 p, float8 mean)
 
float8 normal_quantile (float8 p)
 
float8 pareto_cdf (float8 x, float8 scale, float8 shape)
 Pareto cumulative distribution function. More...
 
float8 pareto_pdf (float8 x, float8 scale, float8 shape)
 Pareto probability density function. More...
 
float8 pareto_quantile (float8 p, float8 scale, float8 shape)
 Pareto quantile function. More...
 
float8 poisson_cdf (float8 x, float8 mean)
 Poisson cumulative distribution function. More...
 
float8 poisson_pmf (int4 x, float8 mean)
 Poisson probability mass function. More...
 
float8 poisson_quantile (float8 p, float8 mean)
 Poisson quantile function. More...
 
float8 rayleigh_cdf (float8 x, float8 scale)
 Rayleigh cumulative distribution function. More...
 
float8 rayleigh_pdf (float8 x, float8 scale)
 Rayleigh probability density function. More...
 
float8 rayleigh_quantile (float8 p, float8 scale)
 Rayleigh quantile function. More...
 
float8 students_t_cdf (float8 x, float8 df)
 Student's t cumulative distribution function. More...
 
float8 students_t_pdf (float8 x, float8 df)
 Student's t probability density function. More...
 
float8 students_t_quantile (float8 p, float8 df)
 Student's t quantile function. More...
 
float8 triangular_cdf (float8 x, float8 lower, float8 mode, float8 upper)
 Triangular cumulative distribution function. More...
 
float8 triangular_pdf (float8 x, float8 lower, float8 mode, float8 upper)
 Triangular probability density function. More...
 
float8 triangular_quantile (float8 p, float8 lower, float8 mode, float8 upper)
 Triangular quantile function. More...
 
float8 uniform_cdf (float8 x, float8 lower, float8 upper)
 Uniform cumulative distribution function. More...
 
float8 uniform_pdf (float8 x, float8 lower, float8 upper)
 Uniform probability density function. More...
 
float8 uniform_quantile (float8 p, float8 lower, float8 upper)
 Uniform quantile function. More...
 
float8 weibull_cdf (float8 x, float8 shape, float8 scale)
 Weibull cumulative distribution function. More...
 
float8 weibull_pdf (float8 x, float8 shape, float8 scale)
 Weibull probability density function. More...
 
float8 weibull_quantile (float8 p, float8 shape, float8 scale)
 Weibull quantile function. More...
 

Detailed Description

See also
For an overview of probability functions, see the module description Probability Functions.

Function Documentation

◆ bernoulli_cdf()

float8 bernoulli_cdf ( float8  x,
float8  sp 
)
Parameters
xRandom variate $ x $
spSuccess probability $ p \in [0,1] $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Bernoulli-distributed random variable with success probability $ \mathit{sp} $

◆ bernoulli_pmf()

float8 bernoulli_pmf ( int4  x,
float8  sp 
)
Parameters
xRandom variate $ x $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
$ f(x) $ where $ f $ is the probability mass function of a Bernoulli-distributed random variable with success probability $ \mathit{sp} $

◆ bernoulli_quantile()

float8 bernoulli_quantile ( float8  p,
float8  sp 
)
Parameters
pProbability $ p \in [0,1] $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
0 if $ p \leq 1 - \mathit{sp} $ and 1 otherwise

◆ beta_cdf()

float8 beta_cdf ( float8  x,
float8  alpha,
float8  beta 
)
Parameters
xRandom variate $ x $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a beta distributed random variable with shape parameters $ \alpha $ and $ \beta $

◆ beta_pdf()

float8 beta_pdf ( float8  x,
float8  alpha,
float8  beta 
)
Parameters
xRandom variate $ x $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a beta random variable with shape parameters $ \alpha $ and $ \beta $

◆ beta_quantile()

float8 beta_quantile ( float8  p,
float8  alpha,
float8  beta 
)
Parameters
pProbability $ p \in [0,1] $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is beta distribution random variable with shape parameters $ \alpha $ and $ \beta $

◆ binomial_cdf()

float8 binomial_cdf ( float8  x,
int4  n,
float8  sp 
)
Parameters
xRandom variate $ x $
nThe number of trials $ n \in \mathbb N_0 $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
$ \Pr[X \leq x] $ where $ X $ is a binomially distributed random variable with $ n $ trials and success probability $ \mathit{sp} $

◆ binomial_pmf()

float8 binomial_pmf ( int4  x,
int4  n,
float8  sp 
)
Parameters
xRandom variate $ x $
nThe number of trials $ n \in \mathbb N_0 $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
$ f(x) $ where $ f $ is the probability mass function of a binomially distributed random variable with $ n $ trials and success probability $ \mathit{sp} $

◆ binomial_quantile()

float8 binomial_quantile ( float8  p,
int4  n,
float8  sp 
)
Parameters
pProbability $ p \in [0,1] $
nThe number of trials $ n \in \mathbb N_0 $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
If $ p < 0.5 $ the maximum $ x $ such that $ p \geq \Pr[X \leq x] $. If $ p \geq 0.5 $ the minimum $ x $ such that $ p \leq \Pr[X \leq x] $. Here, $ X $ is a binomially distributed random variable with $ n $ trials and success probability $ \mathit{sp} $.

◆ cauchy_cdf()

float8 cauchy_cdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ x_0 $
scaleScale $ \gamma > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Cauchy-distributed random variable with location and scale parameters $ x_0 $ and $ \gamma $, respectively

◆ cauchy_pdf()

float8 cauchy_pdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ x_0 $
scaleScale $ \gamma > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Cauchy-distributed random variable with location and scale parameters $ x_0 $ and $ \gamma $, respectively

◆ cauchy_quantile()

float8 cauchy_quantile ( float8  p,
float8  location,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
locationLocation $ x_0 $
scaleScale $ \gamma > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Cauchy-distributed random variable with location and scale parameters $ x_0 $ and $ \gamma $, respectively

◆ chi_squared_cdf()

float8 chi_squared_cdf ( float8  x,
float8  df 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a chi-squared distributed random variable with $ \nu $ degrees of freedom

◆ chi_squared_pdf()

float8 chi_squared_pdf ( float8  x,
float8  df 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a chi-squared distributed random variable with $ \nu $ degrees of freedom

◆ chi_squared_quantile()

float8 chi_squared_quantile ( float8  p,
float8  df 
)
Parameters
pProbability $ p \in [0,1] $
dfDegrees of freedom $ \mu > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a chi-squared distributed random variable with $ \nu $ degrees of freedom

◆ exponential_cdf()

float8 exponential_cdf ( float8  x,
float8  lambda 
)
Parameters
xRandom variate $ x $
lambdaRate parameter $ \lambda > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is an exponentially distributed random variable with rate parameter $ \lambda $

◆ exponential_pdf()

float8 exponential_pdf ( float8  x,
float8  lambda 
)
Parameters
xRandom variate $ x $
lambdaRate parameter $ \lambda > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of exponentially distributed random variable with rate parameter $ \lambda $

◆ exponential_quantile()

float8 exponential_quantile ( float8  p,
float8  lambda 
)
Parameters
pProbability $ p \in [0,1] $
lambdaRate parameter $ \lambda > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a exponentially distributed random variable with rate parameter $ \lambda $

◆ extreme_value_cdf()

float8 extreme_value_cdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ \alpha $
scaleScale $ \beta > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is an extreme-value distributed random variable with location and scale parameters $ \alpha $ and $ \beta $, respectively

◆ extreme_value_pdf()

float8 extreme_value_pdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ \alpha $
scaleScale $ \beta > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of an extreme-value distributed random variable with location and scale parameters $ \alpha $ and $ \beta $, respectively

◆ extreme_value_quantile()

float8 extreme_value_quantile ( float8  p,
float8  location,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
locationLocation $ \alpha $
scaleScale $ \beta > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is an extreme-value distributed random variable with location and scale parameters $ \alpha $ and $ \beta $, respectively

◆ fisher_f_cdf()

float8 fisher_f_cdf ( float8  x,
float8  df1,
float8  df2 
)
Parameters
xRandom variate $ x $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Fisher F-distributed random variable with parameters $ \nu_1 $ and $ \nu_2 $

◆ fisher_f_pdf()

float8 fisher_f_pdf ( float8  x,
float8  df1,
float8  df2 
)
Parameters
xRandom variate $ x $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Fisher F-distributed random variable with parameters $ \nu_1 $ and $ \nu_2 $

◆ fisher_f_quantile()

float8 fisher_f_quantile ( float8  p,
float8  df1,
float8  df2 
)
Parameters
pProbability $ p \in [0,1] $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Fisher F-distributed random variable with parameters $ \nu_1 $ and $ \nu_2 $

◆ gamma_cdf()

float8 gamma_cdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ k > 0 $
scaleScale $ \theta > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a gamma distributed random variable with shape and scale parameters $ k $ and $ \theta $, respectively

◆ gamma_pdf()

float8 gamma_pdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ k > 0 $
scaleScale $ \theta > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a gamma distributed random variable with shape and scale parameters $ k $ and $ \theta $, respectively

◆ gamma_quantile()

float8 gamma_quantile ( float8  p,
float8  shape,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
shapeShape $ k > 0 $
scaleScale $ \theta > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a gamma distributed random variable with shape and scale parameters $ k $ and $ \theta $, respectively

◆ geometric_cdf()

float8 geometric_cdf ( float8  x,
float8  sp 
)
Parameters
xRandom variate $ x $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
$ \Pr[X \leq x] $ where $ X $ is a geometrically distributed random variable with success probability $ \mathit{sp} $.

◆ geometric_pmf()

float8 geometric_pmf ( int4  x,
float8  sp 
)
Parameters
xRandom variate $ x $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
$ f(x) $ where $ f $ is the probability mass function of a geometrically distributed random variable with success probability $ \mathit{sp} $

◆ geometric_quantile()

float8 geometric_quantile ( float8  p,
float8  sp 
)
Parameters
pProbability $ p \in [0,1] $
spSuccess probability $ \mathit{sp} \in [0,1] $
Returns
If $ p < 0.5 $ the maximum $ x $ such that $ p \geq \Pr[X \leq x] $. If $ p \geq 0.5 $ the minimum $ x $ such that $ p \leq \Pr[X \leq x] $. Here, $ X $ is a geometrically distributed random variable with success probability $ \mathit{sp} $.

◆ hypergeometric_cdf()

float8 hypergeometric_cdf ( float8  x,
int4  r,
int4  n,
int4  N 
)
Parameters
xRandom variate $ x $
rNumber $ r \in \{ 0, 1, \dots, N \} $ of items with distinct property (sometimes called the number of success states in population)
nNumber $ n \in \{ 0, 1, \dots, N \} $ of draws (without replacement)
NTotal number $ N \in \mathbb N $ of items
Returns
$ \Pr[X \leq x] $ where $ X $ is a hypergeometrically distributed random variable with parameters $ r, n, N $

◆ hypergeometric_pmf()

float8 hypergeometric_pmf ( int4  x,
int4  r,
int4  n,
int4  N 
)
Parameters
xRandom variate $ x $
rNumber $ r \in \{ 0, 1, \dots, N \} $ of items with distinct property (sometimes called the number of success states in population)
nNumber $ n \in \{ 0, 1, \dots, N \} $ of draws (without replacement)
NTotal number $ N \in \mathbb N $ of items
Returns
$ f(x) $ where $ f $ is the probability mass function of a hypergeometrically distributed random variable with parameters $ r, n, N $

◆ hypergeometric_quantile()

float8 hypergeometric_quantile ( float8  p,
int4  r,
int4  n,
int4  N 
)
Parameters
pProbability $ p \in [0,1] $
rNumber $ r \in \{ 0, 1, \dots, N \} $ of items with distinct property (sometimes called the number of success states in population)
nNumber $ n \in \{ 0, 1, \dots, N \} $ of draws (without replacement)
NTotal number $ N \in \mathbb N $ of items
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a hypergeometrically distributed random variable with parameters $ r, n, N $

◆ inverse_gamma_cdf()

float8 inverse_gamma_cdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is an inverse-gamma distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ inverse_gamma_pdf()

float8 inverse_gamma_pdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of an inverse-gamma distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ inverse_gamma_quantile()

float8 inverse_gamma_quantile ( float8  p,
float8  shape,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is an inverse-gamma distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ kolmogorov_cdf()

float8 kolmogorov_cdf ( float8  x)
Parameters
xRandom variate $ x $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Kolmogorov distributed random variable
See also
Kolmogorov-Smirnov test: ks_test()

◆ laplace_cdf()

float8 laplace_cdf ( float8  x,
float8  mean,
float8  scale 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
scaleScale $ b > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Laplace-distributed random variable with mean $ \mu $ and variance $ 2 b^2 $

◆ laplace_pdf()

float8 laplace_pdf ( float8  x,
float8  mean,
float8  scale 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
scaleScale $ b > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Laplace-distributed random variable with mean $ \mu $ and variance $ 2 b^2 $

◆ laplace_quantile()

float8 laplace_quantile ( float8  p,
float8  mean,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
meanMean $ \mu $
scaleScale $ b > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Laplace-distributed random variable with mean $ \mu $ and variance $ 2 b^2 $

◆ logistic_cdf()

float8 logistic_cdf ( float8  x,
float8  mean,
float8  scale 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
scaleScale $ s > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a logistically distributed random variable with mean $ \mu $ and scale parameter $ s $

◆ logistic_pdf()

float8 logistic_pdf ( float8  x,
float8  mean,
float8  scale 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
scaleScale $ s > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a logistically distributed random variable with mean $ \mu $ and scale parameter $ s $

◆ logistic_quantile()

float8 logistic_quantile ( float8  p,
float8  mean,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
meanMean $ \mu $
scaleScale $ s > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a logistically distributed random variable with mean $ \mu $ and scale parameter $ s $

◆ lognormal_cdf()

float8 lognormal_cdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ m $
scaleScale $ s > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a lognormally distributed random variable with location and scale parameters $ m $ and $ s $, respectively

◆ lognormal_pdf()

float8 lognormal_pdf ( float8  x,
float8  location,
float8  scale 
)
Parameters
xRandom variate $ x $
locationLocation $ m $
scaleScale $ s > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a lognormally distributed random variable with location and scale parameters $ m $ and $ s $, respectively

◆ lognormal_quantile()

float8 lognormal_quantile ( float8  p,
float8  location,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
locationLocation $ m $
scaleScale $ s > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a lognormally distributed random variable with location and scale parameters $ m $ and $ s $, respectively

◆ negative_binomial_cdf()

float8 negative_binomial_cdf ( float8  x,
float8  r,
float8  sp 
)
Parameters
xRandom variate $ x $
rTotal number $ r > 0 $ of successes in $ x + r $ trials (assuming success in the last trial)
spSuccess probability $ \mathit{sp} \in (0,1] $ in each trial
Returns
$ \Pr[X \leq x] $ where $ X $ is a negative-binomially distributed random variable with parameters $ r, \mathit{sp} $

◆ negative_binomial_pmf()

float8 negative_binomial_pmf ( int4  x,
float8  r,
float8  sp 
)
Parameters
xRandom variate $ x $
rTotal number $ r > 0 $ of successes in $ x + r $ trials (assuming success in the last trial)
spSuccess probability $ \mathit{sp} \in (0,1] $ in each trial
Returns
$ f(x) $ where $ f $ is the probability mass function of a negative-binomially distributed random variable with parameters $ r, \mathit{sp} $

◆ negative_binomial_quantile()

float8 negative_binomial_quantile ( float8  p,
float8  r,
float8  sp 
)
Parameters
pProbability $ p \in [0,1] $
rTotal number $ r > 0 $ of successes in $ x + r $ trials (assuming success in the last trial)
spSuccess probability $ \mathit{sp} \in (0,1] $ in each trial
Returns
If $ p < 0.5 $ the maximum $ x $ such that $ p \geq \Pr[X \leq x] $. If $ p \geq 0.5 $ the minimum $ x $ such that $ p \leq \Pr[X \leq x] $. Here, $ X $ is a negative-binomially distributed random variable with parameters $ r, \mathit{sp} $

◆ non_central_beta_cdf()

float8 non_central_beta_cdf ( float8  x,
float8  alpha,
float8  beta,
float8  ncp 
)
Parameters
xRandom variate $ x $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
ncpNoncentrality parameter $ \delta \geq 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a noncentral-beta distributed random variable with shape parameters $ shape_1 $ and $ shape_2 $ and noncentrality parameter $ \delta $

◆ non_central_beta_pdf()

float8 non_central_beta_pdf ( float8  x,
float8  alpha,
float8  beta,
float8  ncp 
)
Parameters
xRandom variate $ x $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
ncpNoncentrality parameter $ \delta \geq 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a noncentral-beta distributed random variable with shape parameters $ shape_1 $ and $ shape_2 $ and noncentrality parameter $ \delta $

◆ non_central_beta_quantile()

float8 non_central_beta_quantile ( float8  p,
float8  alpha,
float8  beta,
float8  ncp 
)
Parameters
pProbability $ p \in [0,1] $
alphaShape $ \alpha > 0 $
betaShape $ \beta > 0 $
ncpNoncentrality parameter $ \delta \geq 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a noncentral-beta distributed random variable with shape parameters $ shape_1 $ and $ shape_2 $ and noncentrality parameter $ \delta $

◆ non_central_chi_squared_cdf()

float8 non_central_chi_squared_cdf ( float8  x,
float8  df,
float8  ncp 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a noncentral-chi-squared distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \lambda $

◆ non_central_chi_squared_pdf()

float8 non_central_chi_squared_pdf ( float8  x,
float8  df,
float8  ncp 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a noncentral-chi-squared distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \lambda $

◆ non_central_chi_squared_quantile()

float8 non_central_chi_squared_quantile ( float8  p,
float8  df,
float8  ncp 
)
Parameters
pProbability $ p \in [0,1] $
dfDegrees of freedom $ \nu > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a noncentral-chi-squared distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \lambda $

◆ non_central_f_cdf()

float8 non_central_f_cdf ( float8  x,
float8  df1,
float8  df2,
float8  ncp 
)
Parameters
xRandom variate $ x $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a noncentral Fisher F-distributed random variable with parameters $ \nu_1, \nu_2, \lambda $

◆ non_central_f_pdf()

float8 non_central_f_pdf ( float8  x,
float8  df1,
float8  df2,
float8  ncp 
)
Parameters
xRandom variate $ x $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a noncentral Fisher F-distributed random variable with parameters $ \nu_1, \nu_2, \lambda $

◆ non_central_f_quantile()

float8 non_central_f_quantile ( float8  p,
float8  df1,
float8  df2,
float8  ncp 
)
Parameters
pProbability $ p \in [0,1] $
df1Degrees of freedom in numerator $ \nu_1 > 0 $
df2Degrees of freedom in denominator $ \nu_1 > 0 $
ncpThe noncentrality parameter $ \lambda \geq 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a noncentral Fisher F-distributed random variable with parameters $ \nu_1, \nu_2, \lambda $

◆ non_central_t_cdf()

float8 non_central_t_cdf ( float8  x,
float8  df,
float8  ncp 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
ncpNoncentrality parameter $ \delta $
Returns
$ \Pr[X \leq x] $ where $ X $ is a noncentral Student's t-distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \delta $

◆ non_central_t_pdf()

float8 non_central_t_pdf ( float8  x,
float8  df,
float8  ncp 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
ncpNoncentrality parameter $ \delta $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a noncentral Student's t-distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \delta $

◆ non_central_t_quantile()

float8 non_central_t_quantile ( float8  p,
float8  df,
float8  ncp 
)
Parameters
pProbability $ p \in [0,1] $
dfDegrees of freedom $ \nu > 0 $
ncpNoncentrality parameter $ \delta $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a noncentral Student's t-distributed random variable with $ \nu $ degrees of freedom and noncentrality parameter $ \delta $

◆ normal_cdf() [1/3]

float8 normal_cdf ( float8  x,
float8  mean = 0,
float8  sd = 1 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
sdStandard deviation $ \sigma > 0 $
Returns
$ \Pr[X \leq x] $ where $ T $ is a normally distributed random variable with mean $ \mu $ and variance $ \sigma^2 $

◆ normal_cdf() [2/3]

float8 normal_cdf ( float8  x,
float8  mean 
)

◆ normal_cdf() [3/3]

float8 normal_cdf ( float8  x)

◆ normal_pdf() [1/3]

float8 normal_pdf ( float8  x,
float8  mean = 0,
float8  sd = 1 
)
Parameters
xRandom variate $ x $
meanMean $ \mu $
sdStandard deviation $ \sigma > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a normally distributed random variable with mean $ \mu $ and variance $ \sigma^2 $

◆ normal_pdf() [2/3]

float8 normal_pdf ( float8  x,
float8  mean 
)

◆ normal_pdf() [3/3]

float8 normal_pdf ( float8  x)

◆ normal_quantile() [1/3]

float8 normal_quantile ( float8  p,
float8  mean = 0,
float8  sd = 1 
)
Parameters
pProbability $ p \in [0,1] $
meanMean $ \mu $
sdStandard deviation $ \sigma > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a normally distributed random variable with mean $ \mu $ and variance $ \sigma^2 $

◆ normal_quantile() [2/3]

float8 normal_quantile ( float8  p,
float8  mean 
)

◆ normal_quantile() [3/3]

float8 normal_quantile ( float8  p)

◆ pareto_cdf()

float8 pareto_cdf ( float8  x,
float8  scale,
float8  shape 
)
Parameters
xRandom variate $ x $
scaleScale $ \beta > 0 $
shapeShape $ \alpha > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Pareto-distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ pareto_pdf()

float8 pareto_pdf ( float8  x,
float8  scale,
float8  shape 
)
Parameters
xRandom variate $ x $
scaleScale $ \beta > 0 $
shapeShape $ \alpha > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Pareto-distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ pareto_quantile()

float8 pareto_quantile ( float8  p,
float8  scale,
float8  shape 
)
Parameters
pProbability $ p \in [0,1] $
scaleScale $ \beta > 0 $
shapeShape $ \alpha > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Pareto-distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ poisson_cdf()

float8 poisson_cdf ( float8  x,
float8  mean 
)
Parameters
xRandom variate $ x $
meanAverage occurrence rate $ \lambda > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Poisson distributed random variable with mean $ \lambda $

◆ poisson_pmf()

float8 poisson_pmf ( int4  x,
float8  mean 
)
Parameters
xRandom variate $ x $
meanAverage occurrence rate $ \lambda > 0 $
Returns
$ f(x) $ where $ f $ is the probability mass function of a Poisson distributed random variable with mean $ \lambda $

◆ poisson_quantile()

float8 poisson_quantile ( float8  p,
float8  mean 
)
Parameters
pProbability $ p \in [0,1] $
meanAverage occurrence rate $ \lambda > 0 $
Returns
If $ p < 0.5 $ the maximum $ x $ such that $ p \geq \Pr[X \leq x] $. If $ p \geq 0.5 $ the minimum $ x $ such that $ p \leq \Pr[X \leq x] $. Here, $ X $ is a Poisson distributed random variable with mean $ \lambda $

◆ rayleigh_cdf()

float8 rayleigh_cdf ( float8  x,
float8  scale 
)
Parameters
xRandom variate $ x $
scaleScale $ \sigma > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Rayleigh-distributed random variable with parameter $ \sigma $

◆ rayleigh_pdf()

float8 rayleigh_pdf ( float8  x,
float8  scale 
)
Parameters
xRandom variate $ x $
scaleScale $ \sigma > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Rayleigh-distributed random variable with parameter $ \sigma $

◆ rayleigh_quantile()

float8 rayleigh_quantile ( float8  p,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
scaleScale $ \sigma > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Rayleigh-distributed random variable with parameter $ \sigma $

◆ students_t_cdf()

float8 students_t_cdf ( float8  x,
float8  df 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a Student's t-distributed random variable with $ \nu $ degrees of freedom

◆ students_t_pdf()

float8 students_t_pdf ( float8  x,
float8  df 
)
Parameters
xRandom variate $ x $
dfDegrees of freedom $ \nu > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a Stundent's t-distributed random variable with $ \nu $ degrees of freedom

◆ students_t_quantile()

float8 students_t_quantile ( float8  p,
float8  df 
)
Parameters
pProbability $ p \in [0,1] $
dfDegrees of freedom $ \nu > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a Student's t-distributed random variable with $ \nu $ degrees of freedom

◆ triangular_cdf()

float8 triangular_cdf ( float8  x,
float8  lower,
float8  mode,
float8  upper 
)
Parameters
xRandom variate $ x $
lowerLower bound $ a $
modeMode $ c \geq a $
upperUpper bound $ b \geq c $, where $ b > a $
Returns
$ \Pr[X \leq x] $ where $ X $ is a triangular distributed random variable with parameters $ a, b, c $

◆ triangular_pdf()

float8 triangular_pdf ( float8  x,
float8  lower,
float8  mode,
float8  upper 
)
Parameters
xRandom variate $ x $
lowerLower bound $ a $
modeMode $ c \geq a $
upperUpper bound $ b \geq c $, where $ b > a $
Returns
$ f(x) $ where $ f $ is the probability density function of a triangular distributed random variable with parameters $ a, b, c $

◆ triangular_quantile()

float8 triangular_quantile ( float8  p,
float8  lower,
float8  mode,
float8  upper 
)
Parameters
pProbability $ p \in [0,1] $
lowerLower bound $ a $
modeMode $ c \geq a $
upperUpper bound $ b \geq c $, where $ b > a $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a trianbular distributed random variable with parameters $ a, b, c $

◆ uniform_cdf()

float8 uniform_cdf ( float8  x,
float8  lower,
float8  upper 
)
Parameters
xRandom variate $ x $
lowerLower bound $ a $
upperUpper bound $ b $
Returns
$ \Pr[X \leq x] $ where $ X $ is a uniform distributed random variable with support $ [a, b] $

◆ uniform_pdf()

float8 uniform_pdf ( float8  x,
float8  lower,
float8  upper 
)
Parameters
xRandom variate $ x $
lowerLower bound $ a $
upperUpper bound $ b $
Returns
$ f(x) $ where $ f $ is the probability density function of a uniform distributed random variable with support $ [a, b] $

◆ uniform_quantile()

float8 uniform_quantile ( float8  p,
float8  lower,
float8  upper 
)
Parameters
pProbability $ p \in [0,1] $
lowerLower bound $ a $
upperUpper bound $ b $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a uniform distributed random variable with support $ [a, b] $

◆ weibull_cdf()

float8 weibull_cdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ \Pr[X \leq x] $ where $ X $ is a weibull distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ weibull_pdf()

float8 weibull_pdf ( float8  x,
float8  shape,
float8  scale 
)
Parameters
xRandom variate $ x $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ f(x) $ where $ f $ is the probability density function of a weibull distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively

◆ weibull_quantile()

float8 weibull_quantile ( float8  p,
float8  shape,
float8  scale 
)
Parameters
pProbability $ p \in [0,1] $
shapeShape $ \alpha > 0 $
scaleScale $ \beta > 0 $
Returns
$ x $ such that $ p = \Pr[X \leq x] $ where $ X $ is a weibull distributed random variable with shape and scale parameters $ \alpha $ and $ \beta $, respectively