t_distribution Derived Type

type, public, extends(distribution) :: t_distribution

Defines Student's T-Distribution.


Contents


Components

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

The number of degrees of freedom.


Type-Bound Procedures

procedure, public :: cdf => td_cdf

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

    Computes the cumulative distribution function.

    The CDF for Student's T-Distribution is given as where .

    Arguments

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

    The t_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 => td_mean

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

    Computes the mean of the distribution.

    Arguments

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

    The t_distribution object.

    Return Value real(kind=real64)

    The mean.

procedure, public :: median => td_median

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

    Computes the median of the distribution.

    Arguments

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

    The t_distribution object.

    Return Value real(kind=real64)

procedure, public :: mode => td_mode

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

    Computes the mode of the distribution.

    Arguments

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

    The t_distribution object.

    Return Value real(kind=real64)

    The mode.

procedure, public :: pdf => td_pdf

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

    Computes the probability density function.

    The PDF for Student's T-Distribution is given as .

    Arguments

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

    The t_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 => td_variance

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

    Computes the variance of the distribution.

    Arguments

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

    The t_distribution object.

    Return Value real(kind=real64)

    The variance.