poisson_distribution Derived Type

type, public, extends(distribution) :: poisson_distribution

Defines a Poisson distribution.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: occrence_rate

The rate of occurrences.


Type-Bound Procedures

procedure, public :: cdf => pd_cdf

  • private pure elemental function pd_cdf(this, x) result(rst)

    Computes the cumulative distribution function.

    The CDF for the Poisson distribution is given as .

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    real(kind=real64), intent(in) :: x

    The number of occurrences ().

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: defined_range => pd_range

  • private pure function pd_range(this) result(rst)

    Gets the defined range for the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    Return Value real(kind=real64), dimension(2)

    The defined range of the probability distributions [0, infinity). As using a value of infinity may cause issue, this routine returns huge(0.0d0) instead.

procedure, public :: mean => pd_mean

  • private pure function pd_mean(this) result(rst)

    Computes the mean of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    Return Value real(kind=real64)

    The mean.

procedure, public :: median => pd_median

  • private pure function pd_median(this) result(rst)

    Computes the median of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    Return Value real(kind=real64)

    The median.

procedure, public :: mode => pd_mode

  • private pure function pd_mode(this) result(rst)

    Computes the mode of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    Return Value real(kind=real64)

    The mode.

procedure, public :: pdf => pd_pdf

  • private pure elemental function pd_pdf(this, x) result(rst)

    Computes the probability mass function.

    The PMF for the Poisson distribution is given as .

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    real(kind=real64), intent(in) :: x

    The number of occurrences ().

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: recenter => pd_recenter

  • private subroutine pd_recenter(this, x)

    Recenters the distribution about the supplied value. This routine has no effect for this distribution as it is always centered about 0.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(inout) :: this

    The poisson_distribution object.

    real(kind=real64), intent(in) :: x

    The value about which to recenter.

procedure, public :: standardized_variable => dist_std_var

  • private pure elemental function dist_std_var(this, x) result(rst)

    Computes the standardized variable for the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    real(kind=real64), intent(in) :: x

    The value of interest.

    Return Value real(kind=real64)

    The result.

procedure, public :: variance => pd_variance

  • private pure function pd_variance(this) result(rst)

    Computes the variance.

    Arguments

    Type IntentOptional Attributes Name
    class(poisson_distribution), intent(in) :: this

    The poisson_distribution object.

    Return Value real(kind=real64)

    The variance.