Module: Distribution::ChiSquare::Statistics2_

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

Class Method Summary collapse

Class Method Details

.cdf(x, k) ⇒ Object

Chi-square cumulative distribution function (cdf).

Returns the integral of Chi-squared distribution with k degrees of freedom over [0, x]



15
16
17
# File 'lib/distribution/chisquare/statistics2.rb', line 15

def cdf(x, k)
  Statistics2.chi2dist(k.to_i,x)
end

.p_value(pr, k) ⇒ Object

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



7
8
9
# File 'lib/distribution/chisquare/statistics2.rb', line 7

def p_value(pr,k)
  Statistics2.pchi2X_(k.to_i, pr)
end