Skip to content

Bernoulli's formula

Bernoulli's formula

Repeated independent trials

Many experiments repeat the same trial several times, and each time only two outcomes count: a success or a failure. The probability of a success in each trial is p\displaystyle p, and the probability of a failure is 1−p\displaystyle 1-p.

  • A shot at the basket: a success – the player scored.
  • A throw of a die: a success – a 6 came up, p=16\displaystyle {p}={\frac{1}{6}}.
  • A check of a product: a success – the product is faulty. “Success” is only the name of the outcome being counted.

Noa scores a free throw with probability 0.7\displaystyle 0.7, whatever happens on her other throws.
Noa takes 3 throws.
What is the probability that she scores exactly 2 of them?

From a tree of three stages to the formula

In the tree below each stage is a throw. The throws are independent, so every “scored” branch carries 0.7\displaystyle 0.7 and every “missed” branch 0.3\displaystyle 0.3, at every stage. The paths of “exactly 2 scores” are marked:

  • Each of the three marked paths has two scores and one miss, so they all have the same probability, in any order: 0.7⋅0.7⋅0.3=0.147\displaystyle {0.7\cdot0.7\cdot0.3}={0.147}.
  • The number of these paths is the number of ways to choose the two throws she scored out of 3: (32)=3\displaystyle {\binom{3}{2}}={3}.

The probability of exactly 2 scores is the sum of the three paths:

(32)⋅0.72⋅0.3=3⋅0.147=0.441\binom{3}{2}\cdot0.7^2\cdot0.3=3\cdot0.147=0.441
Bernoulli’s formula

The same works for any number of trials, without drawing the tree. In n\displaystyle n independent trials, with the probability of a success p\displaystyle p in each:

  • each path with exactly k\displaystyle k successes passes through k\displaystyle k success branches and n−k\displaystyle n-k failure branches, so its probability is pk(1−p)n−k\displaystyle p^k(1-p)^{n-k};
  • there are (nk)\displaystyle \binom{n}{k} such paths – the number of ways to choose the k\displaystyle k successful trials.

The probability of exactly k\displaystyle k successes is the sum of all these paths – Bernoulli’s formula:

Pn(k)=(nk)pk(1−p)n−k\displaystyle P_n(k)=\binom{n}{k}p^k(1-p)^{n-k}

For Noa: n=3\displaystyle {n}={3}, k=2\displaystyle {k}={2}, p=0.7\displaystyle {p}={0.7}, and P3(2)=0.441\displaystyle {P_3(2)}={0.441}.

When the formula fits

Bernoulli’s formula fits when four conditions hold:

  • the number of trials n\displaystyle n is known in advance;
  • each trial has two outcomes: a success or a failure;
  • the probability of a success p\displaystyle p is the same in all the trials;
  • the trials are independent: the outcome of a trial does not change the probabilities in the others.

A bag holds 3 red balls and 2 blue ones, and a ball is taken out 3 times. A success – a red ball.

  • With putting back: at each draw p=35\displaystyle {p}={\frac{3}{5}}, and the draws are independent – the formula can be used.
  • Without putting back: if the first ball is red, 2 red balls out of 4 are left in the bag, and the probability of red on the second draw is 24\displaystyle \frac{2}{4}, not 35\displaystyle \frac{3}{5}. The probability changes, and the formula does not fit – work it out with a tree.
A test answered by guessing

The example below finds n\displaystyle n, p\displaystyle p and k\displaystyle k, and puts them into Bernoulli’s formula.

A test has 10 questions, and each question has 4 answers, only one of them right.
Yoav did not revise, and chooses an answer at random in each question.
What is the probability that he answers exactly 3 questions right?

  • A trial – a question; a success – a right answer, p=14\displaystyle {p}={\frac{1}{4}}.
  • The questions are independent, n=10\displaystyle {n}={10}, k=3\displaystyle {k}={3}.
P10(3)=(103)⋅(14)3⋅(34)7=120⋅164⋅218716384=32805131072≈0.250P_{10}(3)=\binom{10}{3}\cdot\left(\frac{1}{4}\right)^3\cdot\left(\frac{3}{4}\right)^7=120\cdot\frac{1}{64}\cdot\frac{2187}{16384}=\frac{32805}{131072}\approx0.250

About a quarter of the times such a test is guessed, exactly 3 answers come out right.

Exercise 1

A fair die is thrown 3 times.
A success – a 6 comes up.

Complete the probabilities in the tree, mark the paths in which a 6 comes up exactly once, and work out the probability of that.

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

    Exercise 2

    30% of a town’s residents cycle to work.
    5 residents are chosen at random, independently of each other.

    What is the probability that exactly 2 of them cycle to work?

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      Exercise 3

      A fair coin is tossed 8 times.

      What is the probability of getting heads exactly 5 times? Write a fraction in its lowest terms.

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        Exercise 4

        15% of the lamps a factory makes are faulty.
        12 lamps are chosen at random.

        What is the probability that exactly 2 of them are faulty? Round to three decimal places.

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

          Exercise 5

          In which of these situations can Bernoulli’s formula be used? Explain for each.

          1. A class has 10 girls and 10 boys. 4 different students are chosen, and the girls among them are counted.
          2. A die is thrown 10 times, and the even numbers that come up are counted.
          3. A player shoots at the basket until she first scores, and the shots are counted.