Uniform (Integer) functions in the Stochastic DuckDB extension
Function category
Uniform (Integer)
21 functionsDiscrete uniform — every integer in [min, max] equally likely. Random index sampling, dice rolls.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the cumulative distribution function (CDF) of the uniform_int distribution. Returns the probability that a random variable X is less than or equal to x.
SELECT dist_uniform_int_cdf(1, 6, 3);
Output
| dist_uniform_int_cdf(1, 6, 3) |
|---|
| 0.4 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the complementary cumulative distribution function (1 - CDF) of the uniform_int distribution. Returns the probability that X > x, equivalent to the survival function.
SELECT dist_uniform_int_cdf_complement(1, 6, 3);
Output
| dist_uniform_int_cdf_complement(1, 6, 3) |
|---|
| 0.6 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the cumulative hazard function of the uniform_int distribution.
SELECT dist_uniform_int_chf(1, 6, 3);
Output
| dist_uniform_int_chf(1, 6, 3) |
|---|
| 0.5108256237659907 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the hazard function of the uniform_int distribution.
SELECT dist_uniform_int_hazard(1, 6, 3);
Output
| dist_uniform_int_hazard(1, 6, 3) |
|---|
| 0.33333333333333337 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the kurtosis of the uniform_int distribution.
SELECT dist_uniform_int_kurtosis(1, 6);
Output
| dist_uniform_int_kurtosis(1, 6) |
|---|
| 1.8 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the excess kurtosis of the uniform_int distribution.
SELECT dist_uniform_int_kurtosis_excess(1, 6);
Output
| dist_uniform_int_kurtosis_excess(1, 6) |
|---|
| -1.2 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the natural logarithm of the cumulative distribution function (CDF) of the uniform_int distribution. Returns the logarithm of the probability that a random variable X is less than or equal to x.
SELECT dist_uniform_int_log_cdf(1, 6, 3);
Output
| dist_uniform_int_log_cdf(1, 6, 3) |
|---|
| -0.916290731874155 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the natural logarithm of the complementary cumulative distribution function (1 - CDF) of the uniform_int distribution. Returns the logarithm of the probability that X > x, equivalent to the survival function.
SELECT dist_uniform_int_log_cdf_complement(1, 6, 3);
Output
| dist_uniform_int_log_cdf_complement(1, 6, 3) |
|---|
| -0.5108256237659907 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the natural logarithm of the probability density function (log-PDF) of the uniform_int distribution. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_uniform_int_log_pdf(1, 6, 3);
Output
| dist_uniform_int_log_pdf(1, 6, 3) |
|---|
| -1.6094379124341003 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mean (μ) of the uniform_int distribution, which is the first moment.
SELECT dist_uniform_int_mean(1, 6);
Output
| dist_uniform_int_mean(1, 6) |
|---|
| 3 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the median (50th percentile) of the uniform_int distribution, which equals the mean.
SELECT dist_uniform_int_median(1, 6);
Output
| dist_uniform_int_median(1, 6) |
|---|
| 3 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mode (most likely value) of the uniform_int distribution, which equals the mean.
SELECT dist_uniform_int_mode(1, 6);
Output
| dist_uniform_int_mode(1, 6) |
|---|
| 1 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
BIGINT
|
Mode Positional | Description |
Description
Computes the probability density function (PDF) of the uniform_int distribution. Returns the probability densityat point x for a uniform_int distribution with specified parameters.
SELECT dist_uniform_int_pdf(1, 6, 3);
Output
| dist_uniform_int_pdf(1, 6, 3) |
|---|
| 0.2 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the quantile function (inverse CDF) of the uniform_int distribution. Returns the value x such that P(X ≤ x) = p, where p is the cumulative probability.
SELECT dist_uniform_int_quantile(1, 6, 0.95);
Output
| dist_uniform_int_quantile(1, 6, 0.95) |
|---|
| 5 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
p
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary quantile function of the uniform_int distribution. Returns the value x such that P(X > x) = p, useful for computing upper tail quantiles.
SELECT dist_uniform_int_quantile_complement(1, 6, 0.05);
Output
| dist_uniform_int_quantile_complement(1, 6, 0.05) |
|---|
| 5 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the range of the uniform_int distribution.
SELECT dist_uniform_int_range(1, 6);
Output
| dist_uniform_int_range(1, 6) |
|---|
| (0, 4621819117588971750) |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Generates random samples from the uniform_int distribution with specified parameters.
SELECT dist_uniform_int_sample(1, 6);
Output
| dist_uniform_int_sample(1, 6) |
|---|
| 1 |
Related functions
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the skewness of the uniform_int distribution.
SELECT dist_uniform_int_skewness(1, 6);
Output
| dist_uniform_int_skewness(1, 6) |
|---|
| 0.0 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the standard deviation (σ) of the uniform_int distribution.
SELECT dist_uniform_int_stddev(1, 6);
Output
| dist_uniform_int_stddev(1, 6) |
|---|
| 1 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the support of the uniform_int distribution.
SELECT dist_uniform_int_support(1, 6);
Output
| dist_uniform_int_support(1, 6) |
|---|
| (1, 6) |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the variance (σ²) of the uniform_int distribution.
SELECT dist_uniform_int_variance(1, 6);
Output
| dist_uniform_int_variance(1, 6) |
|---|
| 2 |
Related functions
- dist_uniform_int_sample() — Generates random samples from the uniform_int distribution with specified parameters
- dist_uniform_int_pdf() — Computes the probability density function (PDF) of the uniform_int distribution
- dist_uniform_int_cdf() — Computes the cumulative distribution function (CDF) of the uniform_int distribution
- dist_uniform_int_quantile() — Computes the quantile function (inverse CDF) of the uniform_int distribution
- dist_uniform_int_mean() — Returns the mean (μ) of the uniform_int distribution, which is the first moment
- dist_uniform_int_stddev() — Returns the standard deviation (σ) of the uniform_int distribution