Processing math: 100%

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 F(t)=tf(u)du=112Ix(t)(ν2,12) where x(t)=νν+t2.

    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 :: defined_range => dist_defined_range

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

    Gets the defined range for the distribution.

    Arguments

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

    The distribution object.

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

    The defined range of the probability distributions [min, max]. In the event that either min or max are infinite, a value of huge(0.0d0) is returned as opposed to infinite to avoid possible issues with using these values directly.

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 f(t)=Γ(ν+12)νπΓ(ν2)(1+t2ν)(ν+1)/2.

    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 :: recenter => td_recenter

  • private subroutine td_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(t_distribution), intent(inout) :: this

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