Geometric Distribution
The geometric distribution, also known as the discrete waiting time distribution, models the number of failures before the first success in a series of Bernoulli trials. A Bernoulli trial is an experiment with two possible outcomes, labeled 'success' and 'failure,' where the probability of success has a fixed value for all trials.
Definition
The geometric distribution has one parameter
The cumulative distribution function (CDF) is:
The domain of the geometric distribution is
Applications
The geometric distribution is widely used in various fields due to its simplicity and fundamental nature. Common applications include:
The number of successive hits by a baseball player (assuming the probability of a hit is constant) has a geometric distribution with parameter
.The number of attempts made by a player to hit a target has a geometric distribution.
Properties
The geometric distribution has several important statistical properties:
| Property | Value |
|---|---|
| Mean | |
| Variance | |
| Skewness | |
| Kurtosis | |
| Median | |
| Mode | 0 |
| Support | |
| Entropy |
Relationships to Other Distributions
The geometric distribution is closely related to several other distributions:
The Negative Binomial Distribution is a generalization of the geometric distribution, modeling the number of failures before the
th success in a series of Bernoulli trials.The Binomial Distribution models the number of successes in a fixed number of Bernoulli trials.
The GeometricDistribution class
The geometric distribution is implemented by the GeometricDistribution class. It has one constructor which takes one argument: the probability of success of a trial. The probability must be between 0 and 1. The following constructs a geometric distribution with a probability of success 0.4:
var geometric = new GeometricDistribution(0.4);The GeometricDistribution class has one specific property, ProbabilityOfSuccess, which returns the probability of success of a trial.
GeometricDistribution provides static Sample methods for generating random values. The preferred method uses IRandomSource:
For compatibility, Random overloads are also available. See Introduction to Random Sources for details on creating random sources.
var random = new Pcg64();
int sample = GeometricDistribution.Sample(random, 0.4);The above example uses the Pcg32 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 Probability Distributions.
References
"Introduction to Probability Models" by Sheldon M. Ross.
"Probability and Statistics" by Morris H. DeGroot and Mark J. Schervish.