Logistic functions in the Stochastic DuckDB extension
Function category
Logistic
19 functionsLogistic distribution — symmetric S-curve via location/scale. Backbone of logistic regression and Elo-style ratings.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution. Returns the probability that a random variable X is less than or equal to x.
SELECT dist_logistic_cdf(0, 1.0, 0.5);
Output
| dist_logistic_cdf(0, 1.0, 0.5) |
|---|
| 0.6224593312018546 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 (1 - CDF) of the logistic distribution. Returns the probability that X > x, equivalent to the survival function.
SELECT dist_logistic_cdf_complement(0, 1.0, 0.5);
Output
| dist_logistic_cdf_complement(0, 1.0, 0.5) |
|---|
| 0.3775406687981454 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution.
SELECT dist_logistic_chf(0, 1.0, 0.5);
Output
| dist_logistic_chf(0, 1.0, 0.5) |
|---|
| 0.9740769841801068 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution.
SELECT dist_logistic_hazard(0, 1.0, 0.5);
Output
| dist_logistic_hazard(0, 1.0, 0.5) |
|---|
| 0.6224593312018546 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the kurtosis of the logistic distribution.
SELECT dist_logistic_kurtosis(0.0, 1.0);
Output
| dist_logistic_kurtosis(0.0, 1.0) |
|---|
| 4.2 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the excess kurtosis of the logistic distribution.
SELECT dist_logistic_kurtosis_excess(0.0, 1.0);
Output
| dist_logistic_kurtosis_excess(0.0, 1.0) |
|---|
| 1.2 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution. Returns the logarithm of the probability that a random variable X is less than or equal to x.
SELECT dist_logistic_log_cdf(0, 1.0, 0.5);
Output
| dist_logistic_log_cdf(0, 1.0, 0.5) |
|---|
| -0.4740769841801067 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 complementary cumulative distribution function (1 - CDF) of the logistic distribution. Returns the logarithm of the probability that X > x, equivalent to the survival function.
SELECT dist_logistic_log_cdf_complement(0, 1.0, 0.5);
Output
| dist_logistic_log_cdf_complement(0, 1.0, 0.5) |
|---|
| -0.9740769841801067 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 (log-PDF) of the logistic distribution. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_logistic_log_pdf(0, 1.0, 0.5);
Output
| dist_logistic_log_pdf(0, 1.0, 0.5) |
|---|
| -1.4481539683602134 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the median (50th percentile) of the logistic distribution, which equals the mean.
SELECT dist_logistic_median(0.0, 1.0);
Output
| dist_logistic_median(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mode (most likely value) of the logistic distribution, which equals the mean.
SELECT dist_logistic_mode(0.0, 1.0);
Output
| dist_logistic_mode(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution. Returns the probability densityat point x for a logistic distribution with specified parameters.
SELECT dist_logistic_pdf(0, 1.0, 0.5);
Output
| dist_logistic_pdf(0, 1.0, 0.5) |
|---|
| 0.2350037122015945 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution. Returns the value x such that P(X ≤ x) = p, where p is the cumulative probability.
SELECT dist_logistic_quantile(0, 1.0, 0.95);
Output
| dist_logistic_quantile(0, 1.0, 0.95) |
|---|
| 2.9444389791664394 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
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 logistic distribution. Returns the value x such that P(X > x) = p, useful for computing upper tail quantiles.
SELECT dist_logistic_quantile_complement(0, 1.0, 0.95);
Output
| dist_logistic_quantile_complement(0, 1.0, 0.95) |
|---|
| -2.9444389791664394 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the range of the logistic distribution.
SELECT dist_logistic_range(0.0, 1.0);
Output
| dist_logistic_range(0.0, 1.0) |
|---|
| (-inf, inf) |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Generates random samples from the logistic distribution with specified parameters.
SELECT dist_logistic_sample(0.0, 1.0);
Output
| dist_logistic_sample(0.0, 1.0) |
|---|
| -0.17993445860265622 |
Related functions
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the skewness of the logistic distribution.
SELECT dist_logistic_skewness(0.0, 1.0);
Output
| dist_logistic_skewness(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the support of the logistic distribution.
SELECT dist_logistic_support(0.0, 1.0);
Output
| dist_logistic_support(0.0, 1.0) |
|---|
| (-1.7976931348623157e+308, 1.7976931348623157e+308) |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
loc
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the variance (σ²) of the logistic distribution.
SELECT dist_logistic_variance(0.0, 1.0);
Output
| dist_logistic_variance(0.0, 1.0) |
|---|
| 3.289868133696453 |
Related functions
- dist_logistic_sample() — Generates random samples from the logistic distribution with specified parameters
- dist_logistic_pdf() — Computes the probability density function (PDF) of the logistic distribution
- dist_logistic_cdf() — Computes the cumulative distribution function (CDF) of the logistic distribution
- dist_logistic_quantile() — Computes the quantile function (inverse CDF) of the logistic distribution