Module: Distribution::T::Statistics2_

Defined in:
lib/distribution/t/statistics2.rb

Instance Method Summary collapse

Instance 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].



13
14
15
# File 'lib/distribution/t/statistics2.rb', line 13

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

#quantile(pr, k) ⇒ Object Also known as: p_value

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



19
20
21
# File 'lib/distribution/t/statistics2.rb', line 19

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