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

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

Data Types

type  distNegExp_type
This is the derived type for signifying distributions that are of type Negative Exponential as defined in the description of pm_distNegExp. More...

interface  getNegExpCDF
Generate and return the Cumulative Distribution Function (CDF) of the Negative Exponential distribution for an input x within the support of the distribution $$(-\infty, \mu]$$. More...

interface  getNegExpLogPDF
Generate and return the natural logarithm of the Probability Density Function (PDF) of the Negative Exponential distribution for an input x within the support of the distribution $$(-\infty, \mu]$$. More...

interface  getNegExpRand
Return a scalar (or array of arbitrary rank of) random value(s) from the Negative Exponential distribution, optionally with the specified input location and scale parameters mu, sigma.
More...

interface  setNegExpCDF
Return the Cumulative Distribution Function (CDF) of the Negative Exponential distribution for an input x within the support of the distribution $$(-\infty, \mu]$$. More...

interface  setNegExpLogPDF
Return the natural logarithm of the Probability Density Function (PDF) of the Negative Exponential distribution for an input x within the support of the distribution $$(-\infty, \mu]$$. More...

interface  setNegExpRand
Return a scalar (or array of arbitrary rank of) random value(s) from the Negative Exponential distribution, optionally with the specified input location and scale parameters mu, sigma.
More...

Variables

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

Detailed Description

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

Specifically, this module contains routines for computing the following quantities of the Negative Exponential 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 Negative Exponential distribution with the two location and scale parameters $$(\mu, \sigma)$$ is defined as,

$$\large F(x | \mu, \sigma) = \begin{cases} \frac{1}{\sigma} \exp(\frac{x - \mu}{\sigma}) &,~ -\infty < x \leq \mu \\ 0 &,~ x > \mu \end{cases}$$

where $$-\infty < \mu < +\infty$$ is the location parameter and $$0 < \sigma < +\infty$$ is the scale parameter of the distribution.

The corresponding CDF with the two location and scale parameters $$(\mu, \sigma)$$ is defined as,

$$\large \ms{CDF}(x | \mu, \sigma) = \begin{cases} \exp(\frac{x - \mu}{\sigma}) &,~ -\infty < x \leq \mu \\ 0 &,~ x > \mu \end{cases}$$

where $$-\infty < \mu < +\infty$$ is the location parameter and $$0 < \sigma < +\infty$$ is the scale parameter of the distribution.

Random Number Generation

Assuming $$U \in (0, 1]$$ is a uniformly-distributed random variate,

$$\large T = \sigma\log(U) + \mu ~,$$

is a random variate from the Negative Exponential distribution with the location parameter $$-\infty < \mu < +\infty$$ and the scale parameter $$0 < \sigma < +\infty$$ such that $$\mu \leq T < +\infty$$.

Note
Note that the mean of the Negative Exponential distribution is the scale parameter: $$\mathrm{mean} = \sigma$$).
pm_distExp
pm_distUnif
Test:
test_pm_distNegExp

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_distNegExp::MODULE_NAME = "@pm_distNegExp"

Definition at line 86 of file pm_distNegExp.F90.