Stats_La1: Bernoulli Distribution

Author

Aman Aftab

Abstract

Every experiment in the Bernoulli distribution, a discrete probability distribution type, poses a question that can only have a yes or no response. In other words, the random variable can be 1 with a probability p or it can be 0 with a probability (1 - p). A Bernoulli trial is the name given to such an experiment. A Bernoulli Distribution can be used to simulate a pass or fail test. Let us imagine there is an experiment where you flip a fair coin. You will prevail if the coin comes up heads. As a result, the likelihood of receiving heads is p = 1/2. We obtain P (X = 1) = p = 1/2 if X is the random variable obeying a Bernoulli distribution.

Introduction

The probability of a random variable with only two outcomes is described by the discrete probability distribution known as the Bernoulli distribution. In the random procedure known as a Bernoulli trial, the random variable can choose between two outcomes, dubbed success and failure, with a probability of p and q = 1-p, respectively. The failure outcome is denoted as 0, and the success outcome as 1. The Bernoulli distribution is a unique instance of the binomial distribution, where the binomial distribution is the result of adding all Bernoulli trials that have been completed.

Example 1

Tossing a coin can result in only two possible outcomes (head or tail).We call one of these outcome (head) a success and the other (tail), a failure. The probability of success (p) or head is 0.5 for a fair coin. The probability of failure (q) or tail = 1-p = 1-0.5 = 0.5. If we denote head as 1 and tail as 0, we can plot this Bernoulli distribution as follows:

Figure 1:Fair Coin

We have two outcomes:

  1. Tail or 0 with a probability of 0.5.

  2. Head or 1 with a probability of 0.5 also.

This is an example of a probability mass function where we have the probability for each outcome

Example 2

We have an unfair coin where the probability of success (p) or head is 0.8 and the probability of failure (q) or tail = 1-p = 1-0.8 = 0.2. If we denote head as 1 and tail as 0, we can plot this Bernoulli distribution as follows:

Figure 2: Unfair Coin

We have two outcomes:

  1. Tail or 0 with a probability of 0.2.

  2. Head or 1 with a probability of 0.8.

Formulas

X is a binary random variable that is also referred to as an indicator variable. This is since when an event succeeds, X = 1, and when it fails, X = 0. The formula for X is X Bernoulli (p), where p is the parameter. The cumulative distribution function and the probability mass function (pmf) provide the Bernoulli distribution formulas (CDF).

Probability Mass Function

For a Bernoulli distribution, the probability mass function is calculated. The probability mass function indicates the likelihood that a discrete random variable will exactly equal a particular value. The following is the formula for pmf, f, connected to a Bernoulli random variable over probable outcomes “x”:

PMF = f(x, p) = p if x=1

q=1−p if x=0

We can also express this formula as,

f(x, p) = px (1- p)1 - x, x ϵ {0, 1}

Cumulative Distribution Function

The likelihood that a Bernoulli random variable, X, will assume a value less than or equal to x is the definition of X’s cumulative distribution function when assessed at x. The following is the formula:

CDF = F (x, p) = 0 if x<0

1−p if 0<=x<1

1 if x>=1

Mean

We know that for X,

P (X = 1)= p

P (X = 0)= q

E[X] = P(X = 1).1 + P (X = 0).0

E[X] =p.1 + q.0

E[X] = p

Thus, the mean or expected value of a Bernoulli distribution is given by E[X] = p.

Variance

The variance is the difference between the square of the mean of X and the mean of X2. This claim can be expressed mathematically as follows:

Var[X] =E[X2] - (E[X])2

Using theproperties of E[X2], we get,

E[X2] =∑x2P(X=x)

E[X2] = 12 . p+ 02 . q = p

Substituting this value in Var[X] = E[X2] -(E[X])2 we have

Var[X] =p - p2

= p (1 -p)

= p.q

Hence, the variance of a Bernoulli distribution is Var[X] = p (1 - p) = p .

Bernoulli Distribution Applications

Bernoulli distribution is a simple distribution and hence, is widely used in many industries. Given below are some applications of Bernoulli distribution

  1. In medicine, the events that a single patient goes through are modelled using Bernoulli distributions. These occurrences could include sickness, demise, etc.

  2. The outcome of a dice roll, for example, is modelled using the Bernoulli distribution in a logistic regression.

  3. Numerous other probability distributions that have uses in the fields of engineering, aerospace, and medicine are derived from the Bernoulli distribution as well.

(FAQ’S) About Bernoulli Distribution

1. Is Bernoulli distribution discrete or continuous?

In a uni variate discrete probability known as a Bernoulli distribution, there are only two possible results for a random experiment: success or failure

2. When to use Bernoulli distribution?

When only two outcomes—success or failure—are possible for a single random Bernoulli trial, this technique is applied. It is frequently used in statistics, machine learning, data science, analytics, finance, and other fields of study.

3. What is the difference between Bernoulli distribution and Binomial Distribution?

The likelihood of a single random experiment or a Bernoulli trial is determined by the Bernoulli distribution. The probability of the N number of Bernoulli trials is determined by the binomial distribution

References

Cuemath.com

Storyofmathematics.com

wallstreetmojo.com

wikipedia