Module: Distribution::ChiSquare
- Defined in:
- lib/distribution/chisquare.rb
Overview
Calculate cdf and inverse cdf for Chi Square Distribution.
Based on Statistics2 module
Class Method Summary collapse
-
.cdf(x, k) ⇒ Object
Chi-square cumulative distribution function (cdf).
-
.p_value(pr, k) ⇒ Object
Return the P-value of the corresponding integral with k degrees of freedom.
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]
18 19 20 |
# File 'lib/distribution/chisquare.rb', line 18 def cdf(x,k) Statistics2.chi2dist(k,x) end |
.p_value(pr, k) ⇒ Object
Return the P-value of the corresponding integral with k degrees of freedom
10 11 12 |
# File 'lib/distribution/chisquare.rb', line 10 def p_value(pr,k) Statistics2.pchi2X_(k, pr) end |