Gamma functions in the Stochastic DuckDB extension
Function category
Gamma
24 functionsGamma distribution — shape/scale family. Waiting times for k events at constant rate; flexible right-skewed prior.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x).
SELECT dist_gamma_cdf(2.0, 1.0, 1.5);
Output
| dist_gamma_cdf(2.0, 1.0, 1.5) |
|---|
| 0.44217459962892547 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary cumulative distribution function (survival function) of the gamma distribution, P(X > x).
SELECT dist_gamma_cdf_complement(2.0, 1.0, 1.5);
Output
| dist_gamma_cdf_complement(2.0, 1.0, 1.5) |
|---|
| 0.5578254003710745 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative hazard function of the gamma distribution at x.
SELECT dist_gamma_chf(2.0, 1.0, 1.5);
Output
| dist_gamma_chf(2.0, 1.0, 1.5) |
|---|
| 0.583709268125845 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Fits a gamma distribution to x by maximum likelihood (Newton's method). Returns a STRUCT with the fitted parameters (shape, scale) followed by the log_likelihood, aic and bic of the fit, or NULL when there are too few or only identical values.
SELECT dist_gamma_fit(x) AS fit
FROM (VALUES (1.2), (0.7), (2.9), (1.8), (0.4), (3.6), (1.1), (2.2)) t(x);
Output
| fit |
|---|
| {'shape': 2.5167864710333365, 'scale': 0.6903644866171825, 'log_likelihood': -10.910661400281635, 'aic': 25.82132280056327, 'bic': 25.98020588392294} |
Related functions
- dist_gamma_ks_test() — One-sample Kolmogorov-Smirnov test of whether x follows the gamma distribution with the given parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the hazard function of the gamma distribution at x.
SELECT dist_gamma_hazard(2.0, 1.0, 1.5);
Output
| dist_gamma_hazard(2.0, 1.0, 1.5) |
|---|
| 0.6 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
One-sample Kolmogorov-Smirnov test of whether x follows the gamma distribution with the given parameters. Returns the statistic D and the asymptotic p-value.
SELECT dist_gamma_ks_test(x, 2.0, 1.0) AS ks
FROM (VALUES (1.2), (0.7), (2.9), (1.8), (0.4), (3.6), (1.1), (2.2), (5.3), (0.9)) t(x);
Output
| ks |
|---|
| {'statistic': 0.16262726620684465, 'p_value': 0.9540753041927538} |
Related functions
- dist_gamma_fit() — Fits a gamma distribution to x by maximum likelihood (Newton's method)
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the kurtosis of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_kurtosis(2.0, 1.0);
Output
| dist_gamma_kurtosis(2.0, 1.0) |
|---|
| 6.0 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the excess kurtosis of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_kurtosis_excess(2.0, 1.0);
Output
| dist_gamma_kurtosis_excess(2.0, 1.0) |
|---|
| 3.0 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the cumulative distribution function (CDF) of the gamma distribution.
SELECT dist_gamma_log_cdf(2.0, 1.0, 1.5);
Output
| dist_gamma_log_cdf(2.0, 1.0, 1.5) |
|---|
| -0.8160504531201044 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the survival function of the gamma distribution, log P(X > x).
SELECT dist_gamma_log_cdf_complement(2.0, 1.0, 1.5);
Output
| dist_gamma_log_cdf_complement(2.0, 1.0, 1.5) |
|---|
| -0.583709268125845 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the probability density function (PDF) of the gamma distribution at x. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_gamma_log_pdf(2.0, 1.0, 1.5);
Output
| dist_gamma_log_pdf(2.0, 1.0, 1.5) |
|---|
| -1.0945348918918356 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mean of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_mean(2.0, 1.0);
Output
| dist_gamma_mean(2.0, 1.0) |
|---|
| 2.0 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the median of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_median(2.0, 1.0);
Output
| dist_gamma_median(2.0, 1.0) |
|---|
| 1.6783469900166605 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mode (most likely value) of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_mode(2.0, 1.0);
Output
| dist_gamma_mode(2.0, 1.0) |
|---|
| 1.0 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the probability density function (PDF) of the gamma distribution at x.
SELECT dist_gamma_pdf(2.0, 1.0, 1.5);
Output
| dist_gamma_pdf(2.0, 1.0, 1.5) |
|---|
| 0.3346952402226447 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the quantile function (inverse CDF) of the gamma distribution. Returns the smallest x such that P(X <= x) >= p.
SELECT dist_gamma_quantile(2.0, 1.0, 0.95);
Output
| dist_gamma_quantile(2.0, 1.0, 0.95) |
|---|
| 4.743864518390577 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary quantile function of the gamma distribution. Returns x such that P(X > x) = p, useful for upper tail quantiles.
SELECT dist_gamma_quantile_complement(2.0, 1.0, 0.95);
Output
| dist_gamma_quantile_complement(2.0, 1.0, 0.95) |
|---|
| 0.35536151069866223 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the range of the gamma distribution as [min, max].
SELECT dist_gamma_range(2.0, 1.0);
Output
| dist_gamma_range(2.0, 1.0) |
|---|
| [0.0, inf] |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Generates a random sample from the gamma distribution with the specified parameters.
SELECT dist_gamma_sample(2.0, 1.0);
Output
| dist_gamma_sample(2.0, 1.0) |
|---|
| 4.486602891698427 |
Related functions
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
n
|
Type
BIGINT
|
Mode Positional | Description |
Description
Generates a list of n random samples from the gamma distribution with the specified parameters.
SELECT dist_gamma_samples(2.0, 1.0, 5);
Output
| dist_gamma_samples(2.0, 1.0, 5) |
|---|
| [1.6909545838319695, 1.0260805240634108, 3.9159406609787384, 4.2591130332732465, 1.0654403901302942] |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the skewness of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_skewness(2.0, 1.0);
Output
| dist_gamma_skewness(2.0, 1.0) |
|---|
| 1.414213562373095 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the standard deviation of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_stddev(2.0, 1.0);
Output
| dist_gamma_stddev(2.0, 1.0) |
|---|
| 1.4142135623730951 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the support of the gamma distribution as [min, max].
SELECT dist_gamma_support(2.0, 1.0);
Output
| dist_gamma_support(2.0, 1.0) |
|---|
| [0.0, inf] |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
shape
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the variance of the gamma distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_gamma_variance(2.0, 1.0);
Output
| dist_gamma_variance(2.0, 1.0) |
|---|
| 2.0 |
Related functions
- dist_gamma_sample() — Generates a random sample from the gamma distribution with the specified parameters
- dist_gamma_pdf() — Computes the probability density function (PDF) of the gamma distribution at x
- dist_gamma_cdf() — Computes the cumulative distribution function (CDF) of the gamma distribution, P(X <= x)
- dist_gamma_quantile() — Computes the quantile function (inverse CDF) of the gamma distribution
- dist_gamma_mean() — Returns the mean of the gamma distribution
- dist_gamma_stddev() — Returns the standard deviation of the gamma distribution