The Bernoulli distribution essentially models a single trial of flipping a weighted coin. It is the probability distribution of a random variable taking on only two values, ("success") and ("failure") with complementary probabilities and respectively. The Bernoulli distribution therefore describes events having exactly two outcomes, which are ubiquitous in real life. Some examples of such events are as follows: a team will win a championship or not, a student will pass or fail an exam, and a rolled dice will either show a 6 or any other number.
The Bernoulli distribution is the probability distribution of a random variable having the probability density function
Intuitively, it describes a single experiment having two outcomes: success ("1") occurring with probability and failure ("0") occurring with probability It describes a single trial of a Bernoulli experiment.
A closed form of the probability density function of Bernoulli distribution is .
One can represent the Bernoulli distribution graphically as follows:
A fair coin is flipped once. The outcome of the experiment is modeled by the Bernoulli distribution with .
The expected value of a Bernoulli distribution is
The variance of a Bernoulli distribution is calculated as
The mode, the value with the highest probability of occurring, of a Bernoulli distribution is if and if . If , success and failure are equally likely and both and are modes. This is intuitively clear: since there are only two outcomes with complementary probabilities, implies that the probability of success is higher than the probability of failure.
Basic properties of Bernoulli distribution can be calculated by taking in the binomial distribution.
Using properties such as linearity of expectation and rules for calculating the variance, Bernoulli distribution is used in the calculation of the properties of distributions based on the Bernoulli experiment, such as the binomial distribution.
Bernoulli distribution models the following situations:
- A newborn child is either male or female. (Here the probability of a child being a male is roughly 0.5.)
- You either pass or fail an exam.
A tennis player either wins or loses a match.
A dart thrown at a circular dartboard lands randomly over its area (example). The dart will either land closer to the center than to the edge or not (in the second case it is either closer to the edge or equally distant from the center and the edge). In this case .
An integer is chosen randomly. We consider three variables, and . assumes the value if the sum of the digits of is divisible by and otherwise; assumes the value if can be expressed as a sum of four squares of integers and otherwise; assumes values and , respectively, if leaves a remainder of and when divided by .
The sum of digits of a positive integer is divisible by if and only if divides . The probability that a randomly chosen integer in will be divisible by is Therefore, is a Bernoulli distributed random variable with .
Every positive integer can be expressed as a sum of four squares, so the variable is not a random variable and is not Bernoulli distributed. In the definition of the Bernoulli distribution the restriction excludes the case .
The variable models an experiment with more than two outcomes, and hence it is not Bernoulli distributed.
Suppose we have independent Bernoulli trials. Let be the number of successes in the first of these trials, and be the number of successes in the last of these trials. Using properties of the Bernoulli distribution, we can then say the following:
- ~ Binomial because we have independent Bernoulli trials. We don't care about the last trials.
- ~ Binomial because we have independent Bernoulli trials. We don't care about the first trials.
- ~ Binomial because all of the Bernoulli trials are independent, and we can treat them as i.i.d.
- and are independent because the two groups of trials (the first trials and the last trials) are independent.