Uniform (Real) functions in the Stochastic DuckDB extension
Function category
Uniform (Real)
21 functionsContinuous uniform on [min, max]. The default sampling distribution and a building block for inverse-transform sampling.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
min
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
max
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
x
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative distribution function (CDF) of the uniform_real distribution. Returns the probability that a random variable X is less than or equal to x.
SELECT dist_uniform_real_cdf(0, 1.0, 0.5);
Output
| dist_uniform_real_cdf(0, 1.0, 0.5) |
|---|
| 0.5 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the complementary cumulative distribution function (1 - CDF) of the uniform_real distribution. Returns the probability that X > x, equivalent to the survival function.
SELECT dist_uniform_real_cdf_complement(0, 1.0, 0.5);
Output
| dist_uniform_real_cdf_complement(0, 1.0, 0.5) |
|---|
| 0.5 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the cumulative hazard function of the uniform_real distribution.
SELECT dist_uniform_real_chf(0, 1.0, 0.5);
Output
| dist_uniform_real_chf(0, 1.0, 0.5) |
|---|
| 0.6931471805599453 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the hazard function of the uniform_real distribution.
SELECT dist_uniform_real_hazard(0, 1.0, 0.5);
Output
| dist_uniform_real_hazard(0, 1.0, 0.5) |
|---|
| 2.0 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_kurtosis(0.0, 1.0);
Output
| dist_uniform_real_kurtosis(0.0, 1.0) |
|---|
| 1.8 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_kurtosis_excess(0.0, 1.0);
Output
| dist_uniform_real_kurtosis_excess(0.0, 1.0) |
|---|
| -1.2 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the cumulative distribution function (CDF) of the uniform_real distribution. Returns the logarithm of the probability that a random variable X is less than or equal to x.
SELECT dist_uniform_real_log_cdf(0, 1.0, 0.5);
Output
| dist_uniform_real_log_cdf(0, 1.0, 0.5) |
|---|
| -0.6931471805599453 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the complementary cumulative distribution function (1 - CDF) of the uniform_real distribution. Returns the logarithm of the probability that X > x, equivalent to the survival function.
SELECT dist_uniform_real_log_cdf_complement(0, 1.0, 0.5);
Output
| dist_uniform_real_log_cdf_complement(0, 1.0, 0.5) |
|---|
| -0.6931471805599453 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the natural logarithm of the probability density function (log-PDF) of the uniform_real distribution. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_uniform_real_log_pdf(0, 1.0, 0.5);
Output
| dist_uniform_real_log_pdf(0, 1.0, 0.5) |
|---|
| 0.0 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution, which is the first moment.
SELECT dist_uniform_real_mean(0.0, 1.0);
Output
| dist_uniform_real_mean(0.0, 1.0) |
|---|
| 0.5 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution, which equals the mean.
SELECT dist_uniform_real_median(0.0, 1.0);
Output
| dist_uniform_real_median(0.0, 1.0) |
|---|
| 0.5 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution, which equals the mean.
SELECT dist_uniform_real_mode(0.0, 1.0);
Output
| dist_uniform_real_mode(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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
DOUBLE
|
Mode Positional | Description |
Description
Computes the probability density function (PDF) of the uniform_real distribution. Returns the probability densityat point x for a uniform_real distribution with specified parameters.
SELECT dist_uniform_real_pdf(0, 1.0, 0.5);
Output
| dist_uniform_real_pdf(0, 1.0, 0.5) |
|---|
| 1.0 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution. Returns the value x such that P(X ≤ x) = p, where p is the cumulative probability.
SELECT dist_uniform_real_quantile(0, 1.0, 0.95);
Output
| dist_uniform_real_quantile(0, 1.0, 0.95) |
|---|
| 0.95 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution. Returns the value x such that P(X > x) = p, useful for computing upper tail quantiles.
SELECT dist_uniform_real_quantile_complement(0, 1.0, 0.95);
Output
| dist_uniform_real_quantile_complement(0, 1.0, 0.95) |
|---|
| 0.050000000000000044 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_range(0.0, 1.0);
Output
| dist_uniform_real_range(0.0, 1.0) |
|---|
| (-1.7976931348623157e+308, 1.7976931348623157e+308) |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution with specified parameters.
SELECT dist_uniform_real_sample(0.0, 1.0);
Output
| dist_uniform_real_sample(0.0, 1.0) |
|---|
| 0.22649516300575817 |
Related functions
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_skewness(0.0, 1.0);
Output
| dist_uniform_real_skewness(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_stddev(0.0, 1.0);
Output
| dist_uniform_real_stddev(0.0, 1.0) |
|---|
| 0.28867513459481287 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_support(0.0, 1.0);
Output
| dist_uniform_real_support(0.0, 1.0) |
|---|
| (0.0, 1.0) |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real 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_real distribution.
SELECT dist_uniform_real_variance(0.0, 1.0);
Output
| dist_uniform_real_variance(0.0, 1.0) |
|---|
| 0.08333333333333333 |
Related functions
- dist_uniform_real_sample() — Generates random samples from the uniform_real distribution with specified parameters
- dist_uniform_real_pdf() — Computes the probability density function (PDF) of the uniform_real distribution
- dist_uniform_real_cdf() — Computes the cumulative distribution function (CDF) of the uniform_real distribution
- dist_uniform_real_quantile() — Computes the quantile function (inverse CDF) of the uniform_real distribution
- dist_uniform_real_mean() — Returns the mean (μ) of the uniform_real distribution, which is the first moment
- dist_uniform_real_stddev() — Returns the standard deviation (σ) of the uniform_real distribution