class Stats::BinomialDistribution(N, P)

Defined in:

lib/binomial_distribution.cr

Constructors

Instance Method Summary

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


[View source]

Instance Method Detail

def distribute(k : Enumerable) #

@param k [Fixnum] number of test successful.

TODO : Enumerable of Int


[View source]
def distribute(k : Int) #

@param k [Enumerable] list of number of test successful.


[View source]
def n : N #

[View source]
def p : P #

[View source]
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.


[View source]