Module: Distribution::T

Defined in:
lib/distribution/t.rb

Overview

Calculate cdf and inverse cdf for T Distribution. Uses Statistics2 Module.

Class Method Summary collapse

Class Method Details

.cdf(x, k) ⇒ Object

T cumulative distribution function (cdf).

Returns the integral of t-distribution with n degrees of freedom over (-Infty, x].



17
18
19
# File 'lib/distribution/t.rb', line 17

def cdf(x,k)
    Statistics2.tdist(k, x)
end

.p_value(pr, k) ⇒ Object

Return the P-value of the corresponding integral with k degrees of freedom



9
10
11
# File 'lib/distribution/t.rb', line 9

def p_value(pr,k)
    Statistics2.ptdist(k, pr)
end