Log-Series Distribution

The log-series distribution is a discrete distribution that is derived from the MacLaurin series of a logarithmic function. It is also known as the logarithmic series distribution or the logarithmic distribution.

The log-series distribution has one parameter: the probability of success.

The log-series distribution is implemented by the LogarithmicSeriesDistribution class. It has one constructor that takes one argument: the probability of success. The following constructs a log-series distribution for p = 0.5:

C#
var logSeries = new LogarithmicSeriesDistribution(0.5);

The LogarithmicSeriesDistribution class has two specific properties. NumberOfTrials returns the number of trials. ProbabilityOfSuccess returns the probability of success of a trial.

LogarithmicSeriesDistribution has one static (Shared in Visual Basic) method, Sample(Random), which generates a random sample using a user-supplied uniform random number generator. It has two overloads, corresponding to each of the two constructors.

C#
var random = new MersenneTwister();
int sample = LogarithmicSeriesDistribution.Sample(random, 0.5);

The above example uses the MersenneTwister class to generate uniform random numbers.

For details of the properties and methods common to all discrete probability distribution classes, see the topic on discrete distributions.

See Also

Other Resources