LogSeries Distribution - estebanz01/ruby-statistics GitHub Wiki
LogSeries Distribution
Class Methods
Density function
It returns the probability mass value for the specified k and p. It is not defined if K <= 0
.
[47] pry(main)> Distribution::LogSeries.density_function(0, 0.5)
=> nil
[48] pry(main)> Distribution::LogSeries.density_function(3, 0.5)
=> 0.06011229337037347
Cumulative function
It returns the probability P(x <= K)
for the specified K. It is not defined if K <= 0
[49] pry(main)> Distribution::LogSeries.cumulative_function(3, 0.5)
=> 0.9617966939259757
[50] pry(main)> Distribution::LogSeries.cumulative_function(0, 0.5)
=> nil
Mode
It returns the mode for the LogSeries distribution.
mean
It returns the mean for the LogSeries distribution with the specified probability.
[52] pry(main)> Distribution::LogSeries.mean(0.5)
=> 1.4426950408889634
Variance
It returns the expected variance for the LogSeries distribution with the specified probability.
[53] pry(main)> Distribution::LogSeries.variance(0.5)
=> 0.804021100772319