ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
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" |
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:
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,
\begin{equation} \large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~, \end{equation}
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,
\begin{equation} \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) ~, \end{equation}
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,
\begin{equation} \large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~, \end{equation}
Random Number Generation
Assuming that \(U \in [0, 1]\) is a uniformly-distributed random variate, the transformed random variable,
\begin{equation} \large x = x_\mathrm{min} ~ \exp\left(\frac{U}{\eta(x_\mathrm{min}, x_\mathrm{max})}\right) ~, \end{equation}
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,
\begin{equation} \large \eta(x_\mathrm{min}, x_\mathrm{max}) = \frac{1}{\log(x_\mathrm{min}) - \log(x_\mathrm{max})} ~, \end{equation}
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.
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.
character(*, SK), parameter pm_distLogUnif::MODULE_NAME = "@pm_distLogUnif" |
Definition at line 120 of file pm_distLogUnif.F90.