class Stats::BinomialDistribution(N, P)
- Stats::BinomialDistribution(N, P)
- Reference
- Object
Defined in:
lib/binomial_distribution.crConstructors
-
.new(n : N, p : P = 0.5)
@param n [Fixnum] number of tries @param p [Float] probability of success
Instance Method Summary
-
#distribute(k : Enumerable)
@param k [Fixnum] number of test successful.
-
#distribute(k : Int)
@param k [Enumerable] list of number of test successful.
- #n : N
- #p : P
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
def self.new(n : N, p : P = 0.5)
#
@param n [Fixnum] number of tries @param p [Float] probability of success
NOTE if no probability is defined, the default value will be 0.5
Instance Method Detail
def distribute(k : Enumerable)
#
@param k [Fixnum] number of test successful.
TODO : Enumerable of Int
def to_s
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.