Skip to contents

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Kolmogorov-Smirnov distribution.

Usage

kolmogorov_smirnov_pdf(x, n)

kolmogorov_smirnov_lpdf(x, n)

kolmogorov_smirnov_cdf(x, n)

kolmogorov_smirnov_lcdf(x, n)

kolmogorov_smirnov_quantile(p, n)

Arguments

x

quantile

n

sample size (n > 0)

p

probability (0 <= p <= 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Kolmogorov-Smirnov distribution with sample size n = 10
kolmogorov_smirnov_pdf(0.5, 10)
#> [1] 0.2695176
kolmogorov_smirnov_lpdf(0.5, 10)
#> [1] -1.311122
kolmogorov_smirnov_cdf(0.5, 10)
#> [1] 0.9865241
kolmogorov_smirnov_lcdf(0.5, 10)
#> [1] -0.01356751
kolmogorov_smirnov_quantile(0.5, 10)
#> [1] 0.2617017