Discrete Probability Distribution: Part 2

Dhrubjun
Nerd For Tech
Published in
7 min readSep 24, 2021

--

Photo by Eduardo Soares on Unsplash

In the previous chapter of discrete probability distribution, we have learned about discrete random variables, discrete probability distribution, and its expected value and variance.

Discrete Probability Distribution : Part 1 | by Dhrubjun | Nerd For Tech | Sep, 2021 | Medium

In this chapter, we will discuss different discrete probability distributions such as :

  1. Bernoulli Distribution
  2. Binomial Distribution
  3. Geometric Distribution
  4. Poisson Distribution

1. Bernoulli Distribution :

The Bernoulli distribution is one of the simplest discrete distributions. The distribution consists of a single trial and has only two possible outcomes for the random variable. The two possible outcomes can be “Success or Failure”, “Yes or No”, “Head or Tail” etc.

Let X=1, if a success occurs and X=0, if a failure occurs. The X has a Bernoulli distribution :

The probability distribution function of Bernoulli distribution, where p is the probability of success (Image by author)

If a success occurs, X=1. Then,

P(X=1)= p¹ (1–p)⁰ = p

If a failure occurs, X=0. Then,

P(X=0) = p⁰ (1-p)¹ = 1-p

Mean and Variance of Bernoulli Distribution :

The mean or expected value of Bernoulli distribution is given by :

E(X) = ∑ x p(x)

= 0. p⁰ (1-p)¹ + 1. p¹ (1-p)⁰

= p

Again, the variance of Bernoulli distribution is given by :

Var(X) = E[(x-µ)²] = E(x²)- [E(x)]²

Here, E(x) = p.

E(x²) = ∑ x² p(x)

= 0². p⁰ (1-p)¹ + 1². p¹ (1-p)⁰

= p

Hence, Var(X) = p- p² = p(1-p)

Bernoulli Distribution is the building block of other discrete distributions such as Binomial distribution, Geometric distribution, etc. These distributions are built on the assumptions of independent Bernoulli trials.

2. Binomial Distribution :

In Binomial distribution,

  • There is a fixed or finite number of independent Bernoulli trials
  • Each trial can have two possible outcomes labeled as success or failure.
  • The probability of success will be the same in each trial and each of the outcomes is independent of all the others.
  • We are interested in the number of successes.

The number of successes in n independent Bernoulli trials has a binomial distribution.

If the variable X represents the number of successful outcomes out of n trials, then to find the probability there are x successes then we will use the following probability distribution function of Binomial distribution :

The probability distribution function of Binomial distribution (Image bu author)

We will try to understand more about this with the help of an example. Let’s say, in an exam, we have 10 multiple choice questions with each question has 4 multiple options. We need to find the probability of getting exactly 6 questions correct if we pick one random answer from each question.

Now, for every question, there are two possible outcomes: correct or wrong. The probability of guessing the correct answer will be 1/4 or 0.25. Consequently, the probability of guessing the wrong answer will be 0.75. Here, out of 10 questions, 6 questions should be correct (success) and 4 questions are wrong (failure). Here the order in which the 6 questions should be correct doesn’t matter. So the total of 10 questions can be answered or ordered in 10! ways. Similarly, 6 correct answers can be ordered in 6! ways ,and 4 wrong answers can be ordered in 4! ways. So there will be 10!/(6! 4!) = 210 possible ways to get exactly 6 questions correct. This can be written as :

Again, each question will be like an independent Bernoulli trial. So, the probability of getting exactly 6 questions correct will be :

P(X=6) = 210 x (0.25)⁶ x (0.75)⁴ = 0.0162

In the above example, we have calculated the probability for getting 6 questions correct. Similarly, we can calculate the probabilities for different values of X, where X can take values from 0 to 10.

Probability distribution of X (Image by author)
Probability distribution of X (Image by author)

Mean and variance of Binomial Distribution :

The mean of a single trial Bernoulli distribution is p. Since Binomial distribution consists of n independent Bernoulli trails, so mean of Binomial distribution will be given by :

E(X) = E(X1) + E(X2) + E(X3) +………….+ E(Xn)

Since the trails are independent, E(X1)=E(X2) = E(X3)=…….=E(Xn)

Hence, E(X) = np

Similarly, Var(X) = np(1-p)

For the above example, E(X) = 10 x 0.25 = 2.5 and

Var(X) = 10 x 0.25 x 0.75 = 1.875

3. Geometric Distribution :

The Geometric distribution is like Binomial distribution where,

  • There will be a series of independent Bernoulli trials.
  • The outcomes will be binary.
  • The probability of success will be the same in each trial and each of the outcomes is independent of all the others.
  • We are interested in how many trials will be needed to get the first successful outcome.

Let the variable X represents the number of trials needed to get the first successful outcome. If the first success occurs at the xth trial, then the first (x-1) trials must be failures and the xth trial must be a success. Then, the probability mass function of Geometric distribution is given by :

The probability distribution function of Geometric distribution (Image by author)

Let us take an example. In a population of adults, 30% have engineering degree. If adults from this population are selected randomly, what is the probability that the 6th person sampled is the first who has the engineering degree. Here, p=0.3.

P(X=6) = (0.7)⁵ x (0.3) =0.0504

The probability distribution for this example will be as follows :

Probability distribution of X (Image by author)

Here, the minimum value that X can take will be 1 and there is no maximum value. P(X=x) is maximum when x=1 and it gets lower as x increases. The probability of getting a success is highest for the first trial. That means the mode of any Geometric distribution is always 1.

4. Poisson Distribution :

Poisson distribution is a little bit different distribution as compared to the others discussed above. This time there is no series of attempts or trials. Following are the situations which will be under Poisson distribution :

  • Events will occur randomly or independently in a given interval. The interval may be an interval of time or space, for example, during a month or per kilo meter.
  • The probability that an event occurs in a given interval doesn’t change during that interval.
  • The mean or rate of occurrence of an event during a given interval is finite and given by the Greek letter (lambda).

Let the variable X represents the number of occurrences in a given interval, for example, the number of car passes in front of you per hour. If X follows a Poisson distribution with a mean of ⋋ occurrences during that interval, then to find the probability that there will be x occurrences during a specific interval, we will use the following :

The probability distribution function of Poisson distribution (Image bu author)

Let us take an example. In a tea state, there is a machine which is much important for the final output. But the machine use to malfunction at the rate of 4.3 per month. We need to find (i)the probability of the machine not malfunctioning next month and (ii)the probability of the machine malfunctioning three times next month.

If X represents the number of malfunctioning of the machine in a month, then X has the Poisson distribution with ⋋=4.3.

(i) If there is no malfunction, the X must be 0.

(ii) If there will be three malfunctions next month, then the value of X will be 3.

If we calculate the probability distribution of the above example for different values of X, then we will get the following :

Probability distribution of X (Image by author)

The shape of the above Poisson distribution depends on the value of lambda, ⋋. If the value ⋋ is small, then the distribution will be skewed to the right. It becomes more symmetrical as ⋋ gets larger. For the above example, if ⋋ =1.3, then the distribution will be as follows :

Probability distribution of X for ⋋=1.3(Image by author)

The mean and variance of the Poisson distribution are ⋋. That means,

E(X) = ⋋ and Var(X) = ⋋

That’s all for today. I hope you like the article. If you have any questions please feel free to leave a comment.

--

--