Laplace functions in the Stochastic DuckDB extension
Function category
Laplace
21 functionsLaplace (double exponential) — location/scale. Heavier tails than Normal; used in regularized regression and noise modeling.
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the probability that a random variable X is less than or equal to x.
SELECT dist_laplace_cdf(0, 1.0, 0.5);
Output
| dist_laplace_cdf(0, 1.0, 0.5) |
|---|
| 0.6967346701436833 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the probability that X > x, equivalent to the survival function.
SELECT dist_laplace_cdf_complement(0, 1.0, 0.5);
Output
| dist_laplace_cdf_complement(0, 1.0, 0.5) |
|---|
| 0.3032653298563167 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution.
SELECT dist_laplace_chf(0, 1.0, 0.5);
Output
| dist_laplace_chf(0, 1.0, 0.5) |
|---|
| 1.1931471805599454 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution.
SELECT dist_laplace_hazard(0, 1.0, 0.5);
Output
| dist_laplace_hazard(0, 1.0, 0.5) |
|---|
| 1.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the kurtosis of the laplace distribution.
SELECT dist_laplace_kurtosis(0.0, 1.0);
Output
| dist_laplace_kurtosis(0.0, 1.0) |
|---|
| 6.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the excess kurtosis of the laplace distribution.
SELECT dist_laplace_kurtosis_excess(0.0, 1.0);
Output
| dist_laplace_kurtosis_excess(0.0, 1.0) |
|---|
| 3.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the logarithm of the probability that a random variable X is less than or equal to x.
SELECT dist_laplace_log_cdf(0, 1.0, 0.5);
Output
| dist_laplace_log_cdf(0, 1.0, 0.5) |
|---|
| -0.3613506148087591 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the logarithm of the probability that X > x, equivalent to the survival function.
SELECT dist_laplace_log_cdf_complement(0, 1.0, 0.5);
Output
| dist_laplace_log_cdf_complement(0, 1.0, 0.5) |
|---|
| -1.1931471805599454 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Useful for numerical stability when dealing with very small probabilities.
SELECT dist_laplace_log_pdf(0, 1.0, 0.5);
Output
| dist_laplace_log_pdf(0, 1.0, 0.5) |
|---|
| -1.1931471805599454 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mean (μ) of the laplace distribution, which is the first moment.
SELECT dist_laplace_mean(0.0, 1.0);
Output
| dist_laplace_mean(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the median (50th percentile) of the laplace distribution, which equals the mean.
SELECT dist_laplace_median(0.0, 1.0);
Output
| dist_laplace_median(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the mode (most likely value) of the laplace distribution, which equals the mean.
SELECT dist_laplace_mode(0.0, 1.0);
Output
| dist_laplace_mode(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the probability densityat point x for a laplace distribution with specified parameters.
SELECT dist_laplace_pdf(0, 1.0, 0.5);
Output
| dist_laplace_pdf(0, 1.0, 0.5) |
|---|
| 0.3032653298563167 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the value x such that P(X ≤ x) = p, where p is the cumulative probability.
SELECT dist_laplace_quantile(0, 1.0, 0.95);
Output
| dist_laplace_quantile(0, 1.0, 0.95) |
|---|
| 2.302585092994045 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
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 laplace distribution. Returns the value x such that P(X > x) = p, useful for computing upper tail quantiles.
SELECT dist_laplace_quantile_complement(0, 1.0, 0.95);
Output
| dist_laplace_quantile_complement(0, 1.0, 0.95) |
|---|
| -2.302585092994045 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the range of the laplace distribution.
SELECT dist_laplace_range(0.0, 1.0);
Output
| dist_laplace_range(0.0, 1.0) |
|---|
| (-inf, inf) |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Generates random samples from the laplace distribution with specified parameters.
SELECT dist_laplace_sample(0.0, 1.0);
Output
| dist_laplace_sample(0.0, 1.0) |
|---|
| -0.02158105116187718 |
Related functions
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the skewness of the laplace distribution.
SELECT dist_laplace_skewness(0.0, 1.0);
Output
| dist_laplace_skewness(0.0, 1.0) |
|---|
| 0.0 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the standard deviation (σ) of the laplace distribution.
SELECT dist_laplace_stddev(0.0, 1.0);
Output
| dist_laplace_stddev(0.0, 1.0) |
|---|
| 1.4142135623730951 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the support of the laplace distribution.
SELECT dist_laplace_support(0.0, 1.0);
Output
| dist_laplace_support(0.0, 1.0) |
|---|
| (-inf, inf) |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution
Signature
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
location
|
Type
DOUBLE
|
Mode Positional | Description |
Argument
scale
|
Type
DOUBLE
|
Mode Positional | Description |
Description
Returns the variance (σ²) of the laplace distribution.
SELECT dist_laplace_variance(0.0, 1.0);
Output
| dist_laplace_variance(0.0, 1.0) |
|---|
| 2.0000000000000004 |
Related functions
- dist_laplace_sample() — Generates random samples from the laplace distribution with specified parameters
- dist_laplace_pdf() — Computes the probability density function (PDF) of the laplace distribution
- dist_laplace_cdf() — Computes the cumulative distribution function (CDF) of the laplace distribution
- dist_laplace_quantile() — Computes the quantile function (inverse CDF) of the laplace distribution
- dist_laplace_mean() — Returns the mean (μ) of the laplace distribution, which is the first moment
- dist_laplace_stddev() — Returns the standard deviation (σ) of the laplace distribution