stats_mod Module

module~~stats_mod~~UsesGraph module~stats_mod stats_mod module~kinds_mod kinds_mod module~kinds_mod->module~stats_mod
Help

Basic probability and statistics module

Used By

module~~stats_mod~~UsedByGraph module~stats_mod stats_mod program~teststats_prg testStats_prg module~stats_mod->program~teststats_prg
Help


Interfaces

public interface randomUniform

Return sample(s) \(x\) from a uniform distribution such that \(x\in[-1,1]\)

  • private function randomUniform_s() result(o)

    Return a sample from a uniform distribution in the range \(x\in[-1,1]\).

    Arguments

    None

    Return Value real(kind=wp)

    Pseudo-random number

  • private function randomUniform_a1(N) result(o)

    Return \(N\) samples from a uniform distribution in the range \(x\in[-1,1]\).

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: N

    Number of samples

    Return Value real(kind=wp), dimension(:), allocatable

    Pseudo-random number array

public interface randomNormal

Return sample(s) \(x\) from an approximate normal distribution such that \(x\in[-6,6]\), \( \sigma \approx 1.0 \) and \( \mu \approx 0.0 \).

  • private function randomNormal_s() result(o)

    Return a sample from an approximate normal distribution with a mean of \( \mu \approx 0.0\) and a standard deviation of \( \sigma \approx 1.0 \). In this approximate distribution, \(x\in[-6,6]\).

    Arguments

    None

    Return Value real(kind=wp)

    Pseudo-random number

  • private function randomNormal_a1(N) result(o)

    Return \(N\) samples from an approximate normal distribution with a mean of \(\mu=0\) and a standard deviation of \(\sigma=1\). In this approximate distribution, \(x\in[-6,6]\).

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: N

    Number of samples

    Return Value real(kind=wp), dimension(:), allocatable

    Pseudo-random number array


Functions

public function mean(d) result(o)

Compute the mean of an input array

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: d

Data to process

Return Value real(kind=wp)

Mean

public function stDev(d) result(o)

Compute the standard deviation of an input array

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: d

Data to process

Return Value real(kind=wp)

Standard deviation


Subroutines

public subroutine setRandomSeed(S)

Set the pseudo-random number generator seed

Arguments

Type IntentOptional AttributesName
integer :: S