fstats_distributions Module



Contents


Interfaces

interface

  • public pure elemental function distribution_function(this, x) result(rst)

    Defines the interface for a probability distribution function.

    Arguments

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

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

interface

  • public pure function distribution_property(this) result(rst)

    Computes the value of a distribution property.

    Arguments

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

    The distribution object.

    Return Value real(kind=real64)

    The property value.


Derived Types

type, public, extends(distribution) ::  binomial_distribution

Defines a binomial distribution. The binomial distribution describes the probability p of getting k successes in n independent trials.

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: n

The number of independent trials.

real(kind=real64), public :: p

The success probability for each trial. This parameter must exist on the set [0, 1].

Type-Bound Procedures

procedure , public :: cdf => bd_cdf Function
procedure , public :: mean => bd_mean Function
procedure , public :: median => bd_median Function
procedure , public :: mode => bd_mode Function
procedure , public :: pdf => bd_pdf Function
procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure , public :: variance => bd_variance Function

type, public, extends(distribution) ::  chi_squared_distribution

Defines a Chi-squared distribution.

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: dof

The number of degrees of freedom.

Type-Bound Procedures

procedure , public :: cdf => cs_cdf Function
procedure , public :: mean => cs_mean Function
procedure , public :: median => cs_median Function
procedure , public :: mode => cs_mode Function
procedure , public :: pdf => cs_pdf Function
procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure , public :: variance => cs_variance Function

type, public ::  distribution

Defines a probability distribution.

Type-Bound Procedures

procedure (distribution_function) , public , pass :: cdf

Computes the cumulative distribution function.

procedure (distribution_property) , public , pass :: mean

Computes the mean of the distribution.

procedure (distribution_property) , public , pass :: median

Computes the median of the distribution.

procedure (distribution_property) , public , pass :: mode

Computes the mode of the distribution.

procedure (distribution_function) , public , pass :: pdf

Computes the probability density function.

procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure (distribution_property) , public , pass :: variance

Computes the variance of the distribution.

type, public, extends(distribution) ::  f_distribution

Defines an F-distribution.

Components

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

The measure of degrees of freedom for the first data set.

real(kind=real64), public :: d2

The measure of degrees of freedom for the second data set.

Type-Bound Procedures

procedure , public :: cdf => fd_cdf Function
procedure , public :: mean => fd_mean Function
procedure , public :: median => fd_median Function
procedure , public :: mode => fd_mode Function
procedure , public :: pdf => fd_pdf Function
procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure , public :: variance => fd_variance Function

type, public, extends(distribution) ::  normal_distribution

Defines a normal distribution.

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 => nd_cdf Function
procedure , public :: mean => nd_mean Function
procedure , public :: median => nd_median Function
procedure , public :: mode => nd_mode Function
procedure , public :: pdf => nd_pdf Function
procedure , public :: standardize => nd_standardize Subroutine
procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure , public :: variance => nd_variance Function

type, public, extends(distribution) ::  t_distribution

Defines Student's T-Distribution.

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 Function
procedure , public :: mean => td_mean Function
procedure , public :: median => td_median Function
procedure , public :: mode => td_mode Function
procedure , public :: pdf => td_pdf Function
procedure , public :: standardized_variable => dist_std_var Function

Computes the standardized variable for the distribution.

procedure , public :: variance => td_variance Function