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 Cyclic Geometric distribution. More...
Data Types | |
type | distGeomCyclic_type |
This is the derived type for signifying distributions that are of type Cyclic Geometric as defined in the description of pm_distGeomCyclic. More... | |
interface | getGeomCyclicLogCDF |
Generate and return the natural logarithm of the Cumulative Distribution Function (CDF) of the Cyclic Geometric distribution for an input stepSuccess within the discrete integer support of the distribution \([0, period]\). More... | |
interface | getGeomCyclicLogPMF |
Generate and return the natural logarithm of the Probability Mass Function (PMF) of the Cyclic Geometric distribution for an input stepSuccess within the discrete integer support of the distribution \([0, \ms{period}]\). More... | |
interface | getGeomCyclicRand |
Generate and return a scalar (or array of arbitrary rank of) random value(s) from the Cyclic Geometric distribution. More... | |
interface | isFailedGeomCyclicFit |
Generate and return .true. if the parameters of a least-squares fit to the histogram representing a Cyclic-Geometric-distributed sample can be successfully inferred, otherwise, return .false. .More... | |
interface | setGeomCyclicLogCDF |
Return the natural logarithm of the Cumulative Distribution Function (CDF) of the Cyclic Geometric distribution for an input stepSuccess within the discrete integer support of the distribution \([0, period]\). More... | |
interface | setGeomCyclicLogPMF |
Return the natural logarithm of the Probability Mass Function (PMF) of the Cyclic Geometric distribution for an input stepSuccess within the discrete integer support of the distribution \([0, period]\). More... | |
interface | setGeomCyclicRand |
Return a scalar (or array of arbitrary rank of) random value(s) from the Cyclic Geometric distribution. More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_distGeomCyclic" |
This module contains classes and procedures for computing various statistical quantities related to the Cyclic Geometric distribution.
Specifically, this module contains routines for computing the following quantities of the Cyclic Geometric distribution:
The Cyclic Geometric distribution is defined similar to the Geometric distribution, except for the fact that there is an upper limit to the number of Bernoulli trials in the experiment.
Once the upper limit is reached without any success, the experiment recycles to the first Bernoulli trial and the process repeats until the first success occurs.
The Cyclic Geometric distribution appears in the computation of the workload of the different processes in a parallel application, for example, the ParaMonte sampler parallel simulations.
Probability Mass Function (PMF)
If the probability of success on each trial is \(\ms{probSuccess}\), then the probability that the \(\ms{stepSuccess}^{th}\) trial is the first success in a cyclic trial set with a cycle \(\ms{period}\) can be written in terms of the PMF of the Geometric distribution as,
\begin{eqnarray} \large \pi_{\mathcal{CG}} (X = \ms{stepSuccess} ~|~ \ms{probSuccess}, \ms{period}) &=& \sum_{i = 0}^{+\infty} ~ \pi_{\mathcal{G}} (X = i \times \ms{period} + \ms{stepSuccess} ~|~ \ms{probSuccess}) ~, \nonumber \\ &=& \frac{\ms{probSuccess} (1 - \ms{probSuccess})^{\ms{stepSuccess} - 1}}{1 - (1 - \ms{probSuccess})^{\ms{period}}} ~, \end{eqnarray}
where,
Cumulative Distribution Function (CDF)
The CDF of the distribution can be computed as a finite Geometric series,
\begin{eqnarray} \ms{CDF}(X = \ms{stepSuccess} ~|~ \ms{probSuccess}, \ms{period}) &=& \sum_{i = 0}^{\ms{period}} ~ \pi_{\mathcal{CG}} (X = i ~|~ \ms{probSuccess}, \ms{period}) ~, \nonumber \\ &=& \frac{1 - (1 - \ms{probSuccess})^{\ms{stepSuccess}}}{1 - (1 - \ms{probSuccess})^{\ms{period}}} ~, \end{eqnarray}
See Amir Shahmoradi, Fatemeh Bagheri (2020). ParaDRAM: A Cross-Language Toolbox for Parallel High-Performance Delayed-Rejection Adaptive Metropolis Markov Chain Monte Carlo Simulations. for details of the derivation of the above PMF.
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_distGeomCyclic::MODULE_NAME = "@pm_distGeomCyclic" |
Definition at line 87 of file pm_distGeomCyclic.F90.