Module: Distribution::Poisson::Java_

Defined in:
lib/distribution/poisson/java.rb

Class Method Summary collapse

Class Method Details

.cdf(k, l) ⇒ Object


19
20
21
22
# File 'lib/distribution/poisson/java.rb', line 19

def cdf(k, l)
  dist = create_distribution(l)
  dist.cumulativeProbability(k)
end

.create_distribution(l) ⇒ Object

== Create the PoissonDistributionImpl object for use in calculations with mean of l


8
9
10
# File 'lib/distribution/poisson/java.rb', line 8

def create_distribution(l)
  PoissonDistributionImpl.new(l)
end

.pdf(k, l) ⇒ Object

==


14
15
16
17
# File 'lib/distribution/poisson/java.rb', line 14

def pdf(k, l)
  dist = create_distribution(l)
  dist.probability(k)
end