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

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

Data Types

type  distCosRaised_type
 This is the derived type for signifying distributions that are of type Raised Cosine as defined in the description of pm_distCosRaised. More...
 
interface  getCosRaisedCDF
 Generate and return the Cumulative Distribution Function (CDF) of the Raised Cosine distribution for an input x within the support of the distribution \(x \in [\mu - \sigma, \mu + \sigma]\). More...
 
interface  getCosRaisedPDF
 Generate and return the Probability Density Function (PDF) of the Raised Cosine distribution for an input x within the support of the distribution \(x \in [\mu - \sigma, \mu + \sigma]\). More...
 
interface  setCosRaisedCDF
 Return the Cumulative Distribution Function (CDF) of the Raised Cosine distribution for an input x within the support of the distribution \(x \in [\mu - \sigma, \mu + \sigma]\). More...
 
interface  setCosRaisedPDF
 Return the Probability Density Function (PDF) of the Raised Cosine distribution for an input x within the support of the distribution \(x \in [\mu - \sigma, \mu + \sigma]\). More...
 

Variables

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

Detailed Description

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

Specifically, this module contains routines for computing the following quantities of the Raised Cosine 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 \(\pi(\cdot)\) of the Raised Cosine distribution over a strictly-positive support \(x \in [\mu - \sigma, \mu + \sigma]\) is defined with the two (location, scale) parameters \((\mu, \sigma)\) as,

\begin{equation} \large \pi(x | \mu, \sigma) = \frac{1}{2\sigma} \left[ 1 + \cos \left({\frac {x - \mu}{\sigma}} ~ \pi \right) \right] ~,~ x \in [\mu - \sigma, \mu + \sigma] \end{equation}

where \(\pi\) on the right hand side expression is the number \(\ms{Pi}\).

The CDF \(\ms{CDF}(\cdot)\) of the Raised Cosine distribution over a strictly-positive support \(x \in [\mu - \sigma, \mu + \sigma]\) is defined with the two (location, scale) parameters \((\mu, \sigma)\) as,

\begin{equation} \large \ms{CDF}(x | \mu, \sigma) = \frac {1}{2} \left[ 1 + \frac{x - \mu}{\sigma} + \frac{1}{\pi} \sin\left( \frac{x - \mu}{\sigma} \pi \right) \right] ~,~ x \in [\mu - \sigma, \mu + \sigma] \end{equation}

where \(\pi\) on the right hand side expression is the number \(\ms{Pi}\).

Note
The mean, median, and mode of the distribution correspond to the location parameter \(\mu\).
The variance of the distribution can be computed as,

\begin{equation} \large \ms{variance} = \sigma^2 \left( \frac{1}{3} - \frac{2}{\pi^2} \right) ~. \end{equation}

The distribution has a constant skewness of \(0\).
The distribution has a constant Excess Kurtosis of,

\begin{equation} \large \ms{Ex. Kurtosis} = \frac{6(90 - \pi^{4})}{5(\pi^{2} - 6)^{2}} \approx -0.59376 ~. \end{equation}

See also
pm_distUnif
Test:
test_pm_distCosRaised
Todo:
Normal Priority: Two additional interfaces for computing the quantiles and random values of Raised Cosine Distribution must be added.
The methodology employed for the [Beta distribution](@ pm_distBeta) might be useful here.


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_distCosRaised::MODULE_NAME = "@pm_distCosRaised"

Definition at line 89 of file pm_distCosRaised.F90.