log_normal_distribution Derived Type

type, public, extends(distribution) :: log_normal_distribution

Defines a normal distribution.


Contents


Components

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

The mean value of the distribution.

real(kind=real64), public :: standard_deviation

The standard deviation of the distribution.


Type-Bound Procedures

procedure, public :: cdf => lnd_cdf

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

    Computes the cumulative distribution function.

    The CDF for a log-normal distribution is given as

    Arguments

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

    The log_normal_distribution object.

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

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: mean => lnd_mean

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

    Computes the mean of the distribution

    Arguments

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

    The log_normal distribution object.

    Return Value real(kind=real64)

    The mean

procedure, public :: median => lnd_median

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

    Computes the median of the distribution

    Arguments

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

    The log_normal distribution object.

    Return Value real(kind=real64)

    The median

procedure, public :: mode => lnd_mode

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

    Computes the mode of the distribution

    Arguments

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

    The log_normal distribution object.

    Return Value real(kind=real64)

    The mode

procedure, public :: pdf => lnd_pdf

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

    Computes the probability density function.

    The PDF for a log-normal distribution is given as

    Arguments

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

    The log_normal_distribution object.

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

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: standardized_variable => dist_std_var

Computes the standardized variable for the distribution.

  • 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 => lnd_variance

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

    Computes the variance of the distribution

    Arguments

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

    The log_normal distribution object.

    Return Value real(kind=real64)

    The variance