Hypergeometric functions in the Stochastic DuckDB extension
Function category
Hypergeometric
24 functionsHypergeometric — successes in draws without replacement from a finite population. Quality sampling, card games, Fisher's exact test.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative distribution function (CDF) of the hypergeometric distribution, P(X <= x).
SELECT dist_hypergeometric_cdf(10, 5, 50, 2);
Output
| dist_hypergeometric_cdf(10, 5, 50, 2) |
|---|
| 0.9517396968037909 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary cumulative distribution function (survival function) of the hypergeometric distribution, P(X > x).
SELECT dist_hypergeometric_cdf_complement(10, 5, 50, 2);
Output
| dist_hypergeometric_cdf_complement(10, 5, 50, 2) |
|---|
| 0.0482603031962091 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative hazard function of the hypergeometric distribution at x.
SELECT dist_hypergeometric_chf(10, 5, 50, 2);
Output
| dist_hypergeometric_chf(10, 5, 50, 2) |
|---|
| 3.031145936247815 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the hazard function of the hypergeometric distribution at x.
SELECT dist_hypergeometric_hazard(10, 5, 50, 2);
Output
| dist_hypergeometric_hazard(10, 5, 50, 2) |
|---|
| 4.3480812111254545 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the kurtosis of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_kurtosis(10, 5, 50);
Output
| dist_hypergeometric_kurtosis(10, 5, 50) |
|---|
| 5.924940898345154 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the excess kurtosis of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_kurtosis_excess(10, 5, 50);
Output
| dist_hypergeometric_kurtosis_excess(10, 5, 50) |
|---|
| 2.9249408983451537 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the cumulative distribution function (CDF) of the hypergeometric distribution.
SELECT dist_hypergeometric_log_cdf(10, 5, 50, 2);
Output
| dist_hypergeometric_log_cdf(10, 5, 50, 2) |
|---|
| -0.04946370930605859 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the survival function of the hypergeometric distribution, log P(X > x).
SELECT dist_hypergeometric_log_cdf_complement(10, 5, 50, 2);
Output
| dist_hypergeometric_log_cdf_complement(10, 5, 50, 2) |
|---|
| -3.031145936247815 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the probability mass function (PMF) of the hypergeometric distribution at x. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_hypergeometric_log_pdf(10, 5, 50, 2);
Output
| dist_hypergeometric_log_pdf(10, 5, 50, 2) |
|---|
| -1.5614112893515382 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the probability mass function (PMF) of the hypergeometric distribution at x.
SELECT dist_hypergeometric_log_pmf(10, 5, 50, 2);
Output
| dist_hypergeometric_log_pmf(10, 5, 50, 2) |
|---|
| -1.5614112893515382 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the mean of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_mean(10, 5, 50);
Output
| dist_hypergeometric_mean(10, 5, 50) |
|---|
| 1.0 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the median of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_median(10, 5, 50);
Output
| dist_hypergeometric_median(10, 5, 50) |
|---|
| 1.0 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the mode (most likely value) of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_mode(10, 5, 50);
Output
| dist_hypergeometric_mode(10, 5, 50) |
|---|
| 1.0 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the probability mass function (PMF) of the hypergeometric distribution at x.
SELECT dist_hypergeometric_pdf(10, 5, 50, 2);
Output
| dist_hypergeometric_pdf(10, 5, 50, 2) |
|---|
| 0.2098397175706545 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the probability mass function (PMF) of the hypergeometric distribution at x, P(X = x).
SELECT round(dist_hypergeometric_pmf(10, 5, 50, 2), 6) AS prob;
Output
| prob |
|---|
| 0.20984 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the quantile function (inverse CDF) of the hypergeometric distribution. Returns the smallest x such that P(X <= x) >= p.
SELECT dist_hypergeometric_quantile(10, 5, 50, 0.95);
Output
| dist_hypergeometric_quantile(10, 5, 50, 0.95) |
|---|
| 2 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary quantile function of the hypergeometric distribution. Returns x such that P(X > x) = p, useful for upper tail quantiles.
SELECT dist_hypergeometric_quantile_complement(10, 5, 50, 0.95);
Output
| dist_hypergeometric_quantile_complement(10, 5, 50, 0.95) |
|---|
| 0 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the range of the hypergeometric distribution as [min, max].
SELECT dist_hypergeometric_range(10, 5, 50);
Output
| dist_hypergeometric_range(10, 5, 50) |
|---|
| [0.0, 5.0] |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Generates a random sample from the hypergeometric distribution with the specified parameters.
SELECT dist_hypergeometric_sample(10, 5, 50);
Output
| dist_hypergeometric_sample(10, 5, 50) |
|---|
| 2 |
Related functions
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Argument
n
|
Type
BIGINT
|
Mode Positional | Description |
Description
Generates a list of n random samples from the hypergeometric distribution with the specified parameters.
SELECT dist_hypergeometric_samples(10, 5, 50, 5);
Output
| dist_hypergeometric_samples(10, 5, 50, 5) |
|---|
| [0, 0, 0, 2, 1] |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the skewness of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_skewness(10, 5, 50);
Output
| dist_hypergeometric_skewness(10, 5, 50) |
|---|
| 0.5833333333333334 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the standard deviation of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_stddev(10, 5, 50);
Output
| dist_hypergeometric_stddev(10, 5, 50) |
|---|
| 0.8571428571428572 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the support of the hypergeometric distribution as [min, max].
SELECT dist_hypergeometric_support(10, 5, 50);
Output
| dist_hypergeometric_support(10, 5, 50) |
|---|
| [0.0, 5.0] |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
successes
|
Type
BIGINT
|
Mode Positional | Description |
Argument
draws
|
Type
BIGINT
|
Mode Positional | Description |
Argument
population
|
Type
BIGINT
|
Mode Positional | Description |
Description
Returns the variance of the hypergeometric distribution. Returns NULL when it is undefined for the given parameters.
SELECT dist_hypergeometric_variance(10, 5, 50);
Output
| dist_hypergeometric_variance(10, 5, 50) |
|---|
| 0.7346938775510204 |
Related functions
- dist_hypergeometric_sample() — Generates a random sample from the hypergeometric distribution with the specified parameters
- dist_hypergeometric_pdf() — Computes the probability mass function (PMF) of the hypergeometric distribution at x
- dist_hypergeometric_quantile() — Computes the quantile function (inverse CDF) of the hypergeometric distribution
- dist_hypergeometric_mean() — Returns the mean of the hypergeometric distribution
- dist_hypergeometric_stddev() — Returns the standard deviation of the hypergeometric distribution