ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_distKolm Module Reference

This module contains classes and procedures for computing various statistical quantities related to the Kolmogorov distribution. More...

Data Types

type  distKolm_type
 This is the derived type for signifying distributions that are of type Kolmogorov as defined in the description of pm_distKolm. More...
 
interface  getKolmCDF
 Generate and return the Cumulative Distribution Function (CDF) of the Kolmogorov distribution for an input x within the support of the distribution \(X \in [0, +\infty)\). More...
 
interface  getKolmPDF
 Generate and return the Probability Density Function (PDF) of the Kolmogorov distribution for an input x within the support of the distribution \(X \in [0, +\infty)\). More...
 
interface  getKolmQuan
 Generate and return a scalar (or array of arbitrary rank) of the quantile corresponding to the specified CDF of Kolmogorov distribution. More...
 
interface  getKolmRand
 Generate and return a scalar (or array of arbitrary rank) of the random value(s) from the Kolmogorov distribution.
More...
 
interface  setKolmCDF
 Return the Cumulative Distribution Function (CDF) of the Kolmogorov distribution for an input x within the support of the distribution \(X \in [0, +\infty)\). More...
 
interface  setKolmPDF
 Return the Probability Density Function (PDF) of the Kolmogorov distribution for an input x within the support of the distribution \(X \in [0, +\infty)\). More...
 
interface  setKolmQuan
 Return a scalar (or array of arbitrary rank) of the quantile corresponding to the specified CDF of Kolmogorov distribution. More...
 
interface  setKolmRand
 Return a scalar (or array of arbitrary rank) of the random value(s) from the Kolmogorov distribution. More...
 

Variables

character(*, SK), parameter MODULE_NAME = "@pm_distKolm"
 

Detailed Description

This module contains classes and procedures for computing various statistical quantities related to the Kolmogorov distribution.

Specifically, this module contains routines for computing the following quantities of the Kolmogorov distribution:

  1. the Probability Density Function (PDF)
  2. the Cumulative Distribution Function (CDF)
  3. the Random Number Generation from the distribution (RNG)
  4. the Inverse Cumulative Distribution Function (ICDF) or the Quantile Function

The Kolmogorov distribution is the distribution of the random variable

\begin{equation} \large X = \sup_{t\in [0,1]}|B(t)| ~, \end{equation}

where \(B(t)\) is the Brownian bridge.
The cumulative distribution function (CDF) of \(K\) over the non-negative support \(X \in [0, +\infty)\) is given by,

\begin{equation} \large \ms{CDF}(X\leq x) = 1 - 2\sum_{k=1}^{\infty}(-1)^{k-1}e^{-2k^{2}x^{2}} = {\frac{\sqrt{2\pi}}{x}}\sum_{k=1}^{\infty}e^{-(2k-1)^{2}\pi ^{2}/(8x^{2})} ~, \end{equation}

which can also be expressed by the Jacobi theta function \(\vartheta_{01}(z=0;\tau =2ix^{2}/\pi)\).
The distribution is named after Andrey Kolmogorov.

The corresponding PDF \(\pi(\cdot)\) of the Kolmogorov distribution can be obtained by taking the derivative of the CDF of the distribution with respect to \(x\),

\begin{eqnarray} \large \pi(x) &=& 8x \sum_{k=1}^{\infty}(-1)^{k-1} k^2 e^{-2k^{2}x^{2}} \nonumber \\ &=& {\frac{\sqrt{2\pi}}{x^4}}\sum_{k=1}^{\infty} \left[(2k - 1)^2\pi^2/4 - x^2\right] e^{-(2k-1)^{2}\pi ^{2}/(8x^{2})} \nonumber \\ &=& {\frac{2\sqrt{2\pi}}{x^2}}\sum_{k=1}^{\infty} \left[\frac{(2k - 1)^2\pi^2}{8x^2} - \frac{1}{2}\right] e^{-(2k-1)^{2}\pi ^{2}/(8x^{2})} ~, \end{eqnarray}

where the symbol \(\pi\) on the righthand side represents the mathematical number \(\pi = 3.1415\ldots\).

Quantile Function

There is no close form expression for the inverse CDF of the Kolmogorov distribution.
However, root finding methods can be used to refine an initial guess toward an acceptable answer.

Random Number Generation

In the most naive scenario, the quantile function can be used for random number generation.

See also
pm_distUnif
pm_distanceKolm
Test:
test_pm_distKolm
Todo:
Normal Priority: Two additional interfaces for computing the quantiles and random values of Kolmogorov Distribution must be added.
The methodology employed for the [Beta distribution](@ pm_distBeta) might be useful here.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Oct 16, 2009, 11:14 AM, Michigan

Variable Documentation

◆ MODULE_NAME

character(*, SK), parameter pm_distKolm::MODULE_NAME = "@pm_distKolm"

Definition at line 90 of file pm_distKolm.F90.