Module: Hypergeometric

Defined in:
lib/rbbt/statistics/hypergeometric.rb

Class Method Summary collapse

Class Method Details

.hypergeometric(count, positive, negative, total) ⇒ Object



105
106
107
108
# File 'lib/rbbt/statistics/hypergeometric.rb', line 105

def self.hypergeometric(count, positive, negative, total)
  #RSRuby.instance.phyper(count - 1, positive, negative, total, false).to_f
  R.eval("phyper(#{ count } - 1, #{ positive }, #{ negative }, #{ total }, FALSE)").to_f
end