Bernoulli and Binomial Distribution: Real Life Applications

, محدث •0•0Comment iconComment iconComment iconComment icon

How the Bernoulli and binomial distributions model success or failure, with formulas, worked examples (coin, die, test) and exercises.

Writer image

تمت الترجمة بواسطةEditorial

Writer image

تمت المراجعة بواسطةEditorial

تحرير المادة

What is a probability function?

It is a function that assigns to each possible outcome of a discrete random variable its probability of occurring.

Simple example: rolling a fair die.

  • Random variable (X): the number on the face (1, 2, 3, 4, 5, 6).
  • Probability of each face: \( P(X = x) = \frac{1}{6} \).

The probability function is the table or formula that shows this assignment. To be valid, it must satisfy two conditions:

  1. Non-negativity: \( P(X = x) \geq 0 \) for every \( x \). (Example: there is no negative probability, such as −0.2 for rolling a 5 on the die.)
  2. Sum equal to 1: \( \sum_{\text{all } x} P(X = x) = 1 \). (Example: \( \frac{1}{6} + \frac{1}{6} + \dots + \frac{1}{6} = 1 \).)

Difference from continuous variables

  • For discrete variables (such as dice and coins), we use the probability function, \( P(X = x) \).
  • For continuous variables (such as height and weight), we use the probability density function (p.d.f.), because \( P(X = x) = 0 \) for any specific \( x \); only intervals have positive probability.

A discrete variable takes the values 1, 2 and 3 with probabilities 0.2, 0.5 and k. For this to be a valid probability function, what is k?

Loading icon

Answer: 0.3 — the probabilities must add up to 1, so k = 1 − 0.2 − 0.5 = 0.3. Any positive value would only satisfy non-negativity, not the sum equal to 1.

Bernoulli distribution

The Bernoulli distribution models a single experiment with only two possible outcomes: success (1) or failure (0). The probability of success is \( p \) and the probability of failure is \( q = 1 - p \).

Bernoulli distribution formula

The probabilities of a Bernoulli experiment are:

\[ P(X = 1) = p \qquad P(X = 0) = 1 - p = q \]

Where:

  • \( p \): probability of success;
  • \( q \): probability of failure (also written as \( 1 - p \)).

Since a Bernoulli experiment has a single trial, the number of successes \( k \) can only be 1 or 0. So we can also write both probabilities in a single formula:

\[ P(X = k) = p^k \cdot (1 - p)^{1 - k}, \quad k \in \{0, 1\} \]

The mean of a Bernoulli variable is \( E(X) = p \) and its variance is \( Var(X) = p(1 - p) \).

Real-life examples

Example 1: tossing a coin

  • Success: heads (\( k = 1 \)).
  • Failure: tails (\( k = 0 \)).
  • Probability of success (\( p \)): 0.5.

Question: what is the probability of getting heads in a single toss?

Solution:

\[ P(X = 1) = 0.5^1 \cdot (1 - 0.5)^{1 - 1} = 0.5 \quad (50\%) \]

Example 2: guessing a multiple-choice question

  • Success: getting it right (\( k = 1 \)).
  • Failure: getting it wrong (\( k = 0 \)).
  • Probability of success (\( p \)): 0.25 (4 options).

Question: what is the probability of getting the question right?

Solution:

\[ P(X = 1) = 0.25^1 \cdot (1 - 0.25)^{1 - 1} = 0.25 \quad (25\%) \]

When guessing a question with 5 options, where success is getting it right, what is the variance of this Bernoulli variable?

Loading icon

Answer: 0.16 — with p = 1/5 = 0.2, the variance is p(1 − p) = 0.2 × 0.8 = 0.16. The 0.2 is the mean (the probability of getting it right), and 0.04 is p².

Binomial distribution

The binomial distribution models the number of successes in \( n \) independent trials of a Bernoulli experiment, where each trial has the same probability of success \( p \).

Binomial distribution formula

The probability of getting exactly \( k \) successes in \( n \) trials is:

\[ P(X = k) = C_{n,k} \cdot p^k \cdot (1 - p)^{n - k} \]

Where:

  • \( C_{n,k} = \frac{n!}{k!(n-k)!} \): the number of combinations of \( n \) elements taken \( k \) at a time, that is, the number of different orders in which the \( k \) successes can appear;
  • \( p \): probability of success in a single trial;
  • \( 1 - p \): probability of failure;
  • \( n \): total number of trials;
  • \( k \): desired number of successes.

The mean of the binomial is \( np \) and its variance is \( np(1 - p) \). The graph below shows the binomial with \( n = 10 \) and \( p = 0.5 \): the bars are the probabilities of each number of successes, and the green curve is the normal with the same mean and variance, which approximates it well.

Graph representing the probabilities in the Binomial distribution
Graph representing the probabilities in the Binomial distribution

Real-life examples

Example 1: tossing a coin 5 times

  • Success: heads.
  • Failure: tails.
  • Probability of success (\( p \)): 0.5.
  • Number of trials (\( n \)): 5.

Question: what is the probability of getting exactly 3 heads?

Solution:

\[ C_{5,3} = \frac{5!}{3! \cdot (5 - 3)!} = 10 \]

\[ P(X = 3) = 10 \cdot 0.5^3 \cdot (1 - 0.5)^{5 - 3} = 10 \cdot 0.125 \cdot 0.25 = 0.3125 \quad (31.25\%) \]

Example 2: getting 2 questions right out of 5 guesses

  • Success: getting it right.
  • Failure: getting it wrong.
  • Probability of success (\( p \)): 0.25 (4 options).
  • Number of trials (\( n \)): 5.

Question: what is the probability of getting exactly 2 questions right?

Solution:

\[ C_{5,2} = \frac{5!}{2! \cdot (5 - 2)!} = 10 \]

\[ P(X = 2) = 10 \cdot 0.25^2 \cdot (1 - 0.25)^{5 - 2} = 10 \cdot 0.0625 \cdot 0.421875 = 0.2637 \quad (26.37\%) \]

Example 3: rolling a die 4 times

  • Success: rolling a 6.
  • Failure: not rolling a 6.
  • Probability of success (\( p \)): \( \frac{1}{6} \).
  • Number of trials (\( n \)): 4.

Question: what is the probability of rolling a 6 exactly 2 times?

Solution:

\[ C_{4,2} = \frac{4!}{2! \cdot (4 - 2)!} = 6 \]

\[ P(X = 2) = 6 \cdot \left(\frac{1}{6}\right)^2 \cdot \left(\frac{5}{6}\right)^{4 - 2} = 6 \cdot \frac{1}{36} \cdot \frac{25}{36} \approx 0.1157 \quad (11.57\%) \]

A fair coin is tossed 6 times. What is the probability of getting at least one head?

Loading icon

Answer: 98.4% — it is easier to compute the complement: P(no heads) = 0.5^6 = 1/64 ≈ 1.6%, so P(at least one) = 1 − 1/64 ≈ 98.4%. The 1.6% is precisely the complement, forgetting to subtract it from 1.

A salesperson closes a deal on 20% of visits, independently. Over 10 visits, what are the mean number of deals closed and the variance?

Loading icon

Answer: Mean 2 and variance 1.6 — in the binomial, the mean is np = 10 × 0.2 = 2 and the variance is np(1 − p) = 10 × 0.2 × 0.8 = 1.6. Mean 0.2 and variance 0.16 are the values for a single visit (Bernoulli).

Exercises

1) Tossing a coin 8 times:

  • What is the probability of getting exactly 5 heads?
  • What is the probability of getting fewer than 3 heads?

2) Guessing 10 multiple-choice questions (4 options):

  • What is the probability of getting exactly 4 questions right?
  • What is the probability of getting at least 5 questions right?

3) Rolling a die 6 times:

  • What is the probability of rolling a 5 exactly 2 times?
  • What is the probability of rolling a 5 at most 3 times?

4) A soccer team has a 70% chance of winning each match. Over 5 games:

  • What is the probability of winning exactly 3 matches?
  • What is the probability of winning at least 4 matches?

Answer key

1) Tossing a coin 8 times:

  • 21.88%
  • 14.45%

2) Guessing 10 questions:

  • 14.60%
  • 7.81%

3) Rolling a die 6 times:

  • 20.09%
  • 99.13%

4) Soccer team:

  • 30.87%
  • 52.82%

ما رأيك في هذا المقال؟

0%
تقييم المستخدمين (0)

شارك هذا المقال!