Bernoulli Distribution
The Bernoulli distribution, also known as the two-point distribution, is the simplest of the discrete probability distributions. It models a single trial with two possible outcomes: 0 ('failure') and 1 ('success'). The distribution is characterized by a single parameter p, which specifies the probability of success.
Definition
The Bernoulli distribution has a single parameter p (0 ≤ p ≤ 1), which represents the probability of success. The probability mass function (PMF) is given by:
The cumulative distribution function (CDF) is:
The domain of the Bernoulli distribution is
Applications
The Bernoulli distribution is widely used in various fields due to its simplicity and fundamental nature. Common applications include:
Modeling binary outcomes, such as coin tosses (heads or tails).
Representing success/failure scenarios in quality control.
Estimating probabilities in medical trials (e.g., treatment success).
Simulating binary events in computer science and engineering.
Properties
The Bernoulli distribution has several important statistical properties:
Property | Value |
---|---|
Mean | p |
Variance | |
Skewness | |
Kurtosis | |
Median |
|
Mode |
|
Support | |
Entropy |
Relationships to Other Distributions
The Bernoulli distribution is a fundamental building block for several other discrete probability distributions:
The Binomial Distribution models the number of successes in a fixed number of Bernoulli trials.
The Geometric Distribution models the number of failures before the first success in a series of Bernoulli trials.
The Negative Binomial Distribution models the number of failures before the
th success in a series of Bernoulli trials.
The BernoulliDistribution class
The Bernoulli distribution is implemented by the BernoulliDistribution class. It has one constructor which takes one parameter: the probability of success of a trial. The probability must be between 0 and 1. The following constructs a Bernoulli distribution with a probability of success 0.4:
var bernoulli = new BernoulliDistribution(0.4);
The BernoulliDistribution class has one specific property, ProbabilityOfSuccess, which returns the probability of success of a trial.
BernoulliDistribution has one static (Shared in Visual Basic) method, Sample, which generates a random sample using a user-supplied uniform random number generator.
var random = new Pcg32();
int sample = BernoulliDistribution.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.