ParaMonte Fortran 2.0.0 Parallel Monte Carlo and Machine Learning LibrarySee the latest version documentation.
pm_distLogUnif Module Reference

This module contains classes and procedures for computing various statistical quantities related to the LogUniform (or Reciprocal) distribution. More...

## Data Types

type  distLogUnif_type
This is the derived type for signifying distributions that are of type LogUniform as defined in the description of pm_distLogUnif. More...

interface  getLogUnifCDF
Generate and return the Cumulative Distribution Function (CDF) of the LogUniform distribution for an input log(x) within the support of the distribution $$x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]$$.
More...

interface  getLogUnifLogQuan
Generate and return a scalar (or array of arbitrary rank) of the natural logarithm(s) of quantile corresponding to the specified CDF of LogUniform distribution with parameters $$(x_\mathrm{min}, x_\mathrm{max})$$.
More...

interface  getLogUnifPDF
Generate and return the Probability Density Function (PDF) of the LogUniform distribution for an input x within the support of the distribution $$x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]$$.
More...

interface  getLogUnifPDFNF
Generate and return the normalization factor of the PDF of the LogUniform distribution for an input parameter set $$(x_\mathrm{min}, x_\mathrm{max})$$. More...

interface  getLogUnifRand
Generate and return a scalar (or array of arbitrary rank) of random value(s) from the LogUniform distribution with parameters $$(x_\mathrm{min}, x_\mathrm{max})$$.
More...

interface  setLogUnifCDF
Return the Cumulative Distribution Function (CDF) of the LogUniform distribution for an input log(x) within the support of the distribution $$x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]$$. More...

interface  setLogUnifLogQuan
Return a scalar (or array of arbitrary rank) of the natural logarithm(s) of quantile corresponding to the specified CDF of LogUniform distribution with parameters $$(x_\mathrm{min}, x_\mathrm{max})$$. More...

interface  setLogUnifLogRand
Return a scalar (or array of arbitrary rank) of the natural logarithm(s) of random value(s) from the LogUniform distribution with parameters $$(x_\mathrm{min}, x_\mathrm{max})$$. More...

interface  setLogUnifPDF
Return the Probability Density Function (PDF) of the LogUniform distribution for an input x within the support of the distribution $$x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]$$.
More...

## Variables

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

## Detailed Description

This module contains classes and procedures for computing various statistical quantities related to the LogUniform (or Reciprocal) distribution.

Specifically, this module contains routines for computing the following quantities of the LogUniform (or Reciprocal) 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

In probability and statistics, the reciprocal distribution, also known as the LogUniform distribution, is a continuous probability distribution.
It is characterized by its probability density function, within the support of the distribution, being proportional to the reciprocal of the variable.

The PDF of the LogUniform distribution with the two scale parameters $$(x_\mathrm{min}, x_\mathrm{max})$$ over a strictly-positive support $$x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]$$ is defined as,

\begin{eqnarray} \large \pi(x | x_\mathrm{min}, x_\mathrm{max}) &=& \frac{\eta(x_\mathrm{min}, x_\mathrm{max})}{x} ~, \\ &=& \frac{1}{x ~ \left[\log(x_\mathrm{min}) - \log(x_\mathrm{max})\right]} ~, \end{eqnarray}

where $$\log(\cdot)$$ is the natural logarithm and the condition $$\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}$$ holds.
The term $$\eta(x_\mathrm{min}, x_\mathrm{max})$$ is the normalization factor of the PDF,

$$\large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~,$$

The LogUniform distribution can be considered an special case of the Truncated Pareto distribution, or the Truncated Power distribution, or the Truncated Poweto distribution.

The CDF of the LogUniform distribution is detailed in pm_distLogUnif.
The corresponding CDF of the LogUniform distribution is given by,

\begin{eqnarray} \large \mathrm{CDF}(x | x_\mathrm{min}, x_\mathrm{max}) &=& \eta(x_\mathrm{min}, x_\mathrm{max}) \log\left(\frac{x}{x_\mathrm{xmin}}\right) ~, \\ &=& 1 + \eta(x_\mathrm{min}, x_\mathrm{max}) \log\left(\frac{x}{x_\mathrm{xmax}}\right) ~, \\ \end{eqnarray}

where $$\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}$$ holds.
The term $$\eta(x_\mathrm{min}, x_\mathrm{max})$$ is the normalization factor of the PDF,

\begin{eqnarray} \large \eta(x_\mathrm{min}, x_\mathrm{max}) &=& \frac{1}{\log(x_\mathrm{max}) - \log(x_\mathrm{min})} ~. \end{eqnarray}

The corresponding Inverse CDF or Quantile Function of the LogUniform distribution is given by,

$$\large Q(\mathrm{CDF}(x); x_\mathrm{min}, x_\mathrm{max}) \equiv x = x_\mathrm{min} ~ \exp\left(\frac{\mathrm{CDF}(x)}{\eta(x_\mathrm{min}, x_\mathrm{max})}\right) ~,$$

where the condition $$\mathbf{0 < x_\mathrm{min} \leq Q(\mathrm{CDF}(x); x_\mathrm{min}, x_\mathrm{max}) \leq x_\mathrm{max} < +\infty}$$ holds and $$\eta(x_\mathrm{min}, x_\mathrm{max})$$ is the normalization factor of the PDF,

$$\large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~,$$

Random Number Generation

Assuming that $$U \in [0, 1]$$ is a uniformly-distributed random variate, the transformed random variable,

$$\large x = x_\mathrm{min} ~ \exp\left(\frac{U}{\eta(x_\mathrm{min}, x_\mathrm{max})}\right) ~,$$

follows a LogUniform distribution with parameters $$(x_\mathrm{min}, x_\mathrm{max}$$) where $$\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}$$ holds and $$\eta(x_\mathrm{min}, x_\mathrm{max})$$ is the normalization factor of the PDF,

$$\large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~,$$

pm_distLogUnif
pm_distLogUnif
pm_distLogUnif
pm_distPareto
pm_distPoweto
pm_distPower
Test:
test_pm_distLogUnif

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.

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

## ◆ MODULE_NAME

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

Definition at line 120 of file pm_distLogUnif.F90.