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

This module contains classes and procedures for computing various statistical quantities related to the (Truncated) Power distribution. More...

Data Types

type  distPower_type
 This is the derived type for signifying distributions that are of type Power as defined in the description of pm_distPower. More...
 
interface  getPowerLogCDF
 Generate and return the natural logarithm of the Cumulative Distribution Function (CDF) of the (Truncated) Power distribution for an input log(x) within the support of the distribution \(x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]\). More...
 
interface  getPowerLogCDFNF
 Generate and return the natural logarithm of the normalization factor of the CDF of the (Truncated) Power distribution for an input parameter set \((\alpha, x_\mathrm{min}, x_\mathrm{max})\). More...
 
interface  getPowerLogPDF
 Generate and return the natural logarithm of the Probability Density Function (PDF) of the (Truncated) Power distribution for an input log(x) within the support of the distribution \(x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]\). More...
 
interface  getPowerLogPDFNF
 Generate and return the natural logarithm of the normalization factor of the PDF of the (Truncated) Power distribution for an input parameter set \((\alpha, x_\mathrm{min}, x_\mathrm{max})\). More...
 
interface  getPowerLogQuan
 Generate and return a scalar (or array of arbitrary rank) of the natural logarithm(s) of quantile corresponding to the specified CDF of (Truncated) Power distribution with parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max})\). More...
 
interface  getPowerLogRand
 Generate and return a scalar (or array of arbitrary rank) of the natural logarithm(s) of random value(s) from the (Truncated) Power distribution with parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max})\).
More...
 
interface  setPowerLogCDF
 Return the natural logarithm of the Cumulative Distribution Function (CDF) of the (Truncated) Power distribution for an input log(x) within the support of the distribution \(x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]\). More...
 
interface  setPowerLogPDF
 Return the natural logarithm of the Probability Density Function (PDF) of the (Truncated) Power distribution for an input log(x) within the support of the distribution \(x \in [0 < x_\mathrm{min}, x_\mathrm{max} < +\infty]\). More...
 
interface  setPowerLogQuan
 Return a scalar (or array of arbitrary rank) of the natural logarithm(s) of quantile corresponding to the specified CDF of (Truncated) Power distribution with parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max})\). More...
 
interface  setPowerLogRand
 Return a scalar (or array of arbitrary rank) of the natural logarithm(s) of random value(s) from the (Truncated) Power distribution with parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max})\). More...
 

Variables

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

Detailed Description

This module contains classes and procedures for computing various statistical quantities related to the (Truncated) Power distribution.

Specifically, this module contains routines for computing the following quantities of the (Truncated) Power 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 PDF of the (Truncated) Power distribution over a strictly-positive support \(x \in [x_\mathrm{min}, x_\mathrm{max}]\) is defined with the three (shape, scale, scale) parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max})\) as,

\begin{equation} \large \pi(x | \alpha, x_\mathrm{min}, x_\mathrm{max}) = \eta(\alpha, x_\mathrm{min}, x_\mathrm{max}) ~ x^{\alpha - 1} ~, \end{equation}

where \(\mathbf{0 < \alpha < +\infty}\) and \(\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}\) hold, and \(\eta(\alpha, x_\mathrm{min}, x_\mathrm{max})\) is the normalization factor of the PDF,

\begin{equation} \large \eta(\alpha, x_\mathrm{min}, x_\mathrm{max}) = \frac{\alpha}{x_\mathrm{max}^\alpha - x_\mathrm{min}^\alpha} ~, \end{equation}

When \(x_\mathrm{min} \rightarrow 0\), the Truncated Power distribution simplifies to the Power Distribution with PDF.

\begin{equation} \large \lim_{x_\mathrm{min} \rightarrow 0} \pi(x | \alpha, x_\mathrm{min}, x_\mathrm{max}) = \frac{\alpha}{x_\mathrm{max}^\alpha} x^{\alpha - 1} ~, \end{equation}

The equation for \(\eta(\cdot)\) for the Power distribution simplifies to,

\begin{equation} \large \lim_{x_\mathrm{min} \rightarrow 0} \eta(\alpha, x_\mathrm{min}, x_\mathrm{max}) = \alpha x_\mathrm{max}^{-\alpha} ~,~ 0 < \alpha < +\infty. \end{equation}

The corresponding CDF of the (Truncated) Power distribution is given by,

\begin{equation} \large \mathrm{CDF}(x | \alpha, x_\mathrm{min}, x_\mathrm{max}) = \zeta(\alpha, x_\mathrm{min}, x_\mathrm{max}) \bigg[\bigg(\frac{x}{x_\mathrm{min}}\bigg)^\alpha - 1\bigg] ~, \end{equation}

where \(\mathbf{0 < \alpha < +\infty}\) and \(\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}\) hold, and \(\zeta(\alpha, x_\mathrm{min}, x_\mathrm{max})\) is the normalization factor of the CDF,

\begin{eqnarray} \large \zeta(\alpha, x_\mathrm{min}, x_\mathrm{max}) &=& \frac{x_\mathrm{min}^\alpha}{x_\mathrm{max}^\alpha - x_\mathrm{min}^\alpha} ~, \\ &=& \frac{x_\mathrm{min}^\alpha}{\alpha} \eta(\alpha, x_\mathrm{min}, x_\mathrm{max}) ~, \end{eqnarray}

where \(\eta(\cdot)\) is the normalization factor of the PDF.

When \(x_\mathrm{min} \rightarrow 0\), the Truncated Power distribution simplifies to the Power Distribution with CDF,

\begin{equation} \large \lim_{x_\mathrm{min} \rightarrow 0} \mathrm{CDF}(x | \alpha, x_\mathrm{min}, x_\mathrm{max}) = \bigg(\frac{x}{x_\mathrm{max}}\bigg)^\alpha ~, \end{equation}

with,

\begin{equation} \large \lim_{x_\mathrm{min} \rightarrow 0} \zeta(\alpha, x_\mathrm{min}, x_\mathrm{max}) = x_\mathrm{max}^{-\alpha} ~. \end{equation}

The corresponding Inverse CDF of the (Truncated) Power distribution is given by,

\begin{equation} \large Q(\mathrm{CDF}(x); \alpha, x_\mathrm{min}, x_\mathrm{max}) \equiv x = x_\mathrm{min} \bigg(1 + \frac{\mathrm{CDF}(x)}{\zeta(\alpha, x_\mathrm{min}, x_\mathrm{max})}\bigg)^{\frac{1}{\alpha}} ~, \end{equation}

where \(\mathbf{0 < \alpha < +\infty}\) and \(\mathbf{0 < x_\mathrm{min} \leq Q(\mathrm{CDF}(x); \alpha, x_\mathrm{min}, x_\mathrm{max}) \leq x_\mathrm{max} < +\infty}\) hold, and \(\zeta(\alpha, x_\mathrm{min}, x_\mathrm{max})\) is the normalization factor of the CDF,

\begin{equation} \large \zeta(\alpha, x_\mathrm{min}, x_\mathrm{max}) = \frac{x_\mathrm{min}^\alpha}{x_\mathrm{max}^\alpha - x_\mathrm{min}^\alpha} ~. \end{equation}

When \(x_\mathrm{max} \rightarrow +\infty\), the Truncated Power distribution simplifies to the Power Distribution, with,

\begin{equation} \large Q(\mathrm{CDF}(x); \alpha, x_\mathrm{min}, x_\mathrm{max}) \equiv x = x_\mathrm{max} \big(\mathrm{CDF}(x)\big)^{\frac{1}{\alpha}} = \bigg(\frac{\mathrm{CDF}(x)}{\zeta(\alpha, x_\mathrm{max})}\bigg)^{\frac{1}{\alpha}} ~, \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} \bigg(1 + \frac{U}{\zeta(\alpha, x_\mathrm{min}, x_\mathrm{max})}\bigg)^{\frac{1}{\alpha}} ~, \end{equation}

follows a Truncated Power distribution with parameters \((\alpha, x_\mathrm{min}, x_\mathrm{max}\)) where \(\mathbf{0 < \alpha < +\infty}\) and \(\mathbf{0 < x_\mathrm{min} \leq x \leq x_\mathrm{max} < +\infty}\) hold, and \(\zeta(\alpha, x_\mathrm{min}, x_\mathrm{max})\) is the normalization factor of the CDF,

\begin{equation} \large \zeta(\alpha, x_\mathrm{min}, x_\mathrm{max}) = \frac{x_\mathrm{min}^\alpha}{x_\mathrm{max}^\alpha - x_\mathrm{min}^\alpha} ~. \end{equation}

When \(x_\mathrm{max} \rightarrow +\infty\), the Truncated Power distribution simplifies to the Power Distribution, with,

\begin{equation} \large x = x_\mathrm{max} U^{\frac{1}{\alpha}} = \bigg(\frac{U}{\zeta(\alpha, x_\mathrm{max})}\bigg)^{\frac{1}{\alpha}} ~, \end{equation}

Remarks
See pm_distPareto for the case of \(-\infty < \alpha < 0\).
See pm_distPoweto for the case of \(\alpha = 0\).
See also
pm_distPower
pm_distPareto
pm_distPoweto
Test:
test_pm_distPower


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_distPower::MODULE_NAME = "@pm_distPower"

Definition at line 144 of file pm_distPower.F90.