Skip to content

Conditional probability and dependent events

Conditional probability and dependent events

Conditional probability from a two-way table

A conditional probability is the probability of an event A\displaystyle A when an event B\displaystyle B is already known to have happened. It is written P(A∣B)\displaystyle P(A|B) and read “the probability of A\displaystyle A given B\displaystyle B”. In a two-way table, divide by the total of B\displaystyle B’s row (or column).

A survey asked 500 pupils whether they do sport regularly, and how many hours they sleep at night:

Sleep 8 hours or moreSleep lessTotal
Do sport12080200
Do no sport105195300
Total225275500

A\displaystyle A – the pupil sleeps 8 hours or more; B\displaystyle B – the pupil does sport.

  • Of all the pupils: P(A)=225500=0.45\displaystyle {P(A)}={\frac{225}{500}}={0.45}.
  • Of the 200 who do sport: P(A∣B)=120200=0.6\displaystyle {P(A|B)}={\frac{120}{200}}={0.6}.
The formula of conditional probability

When probabilities are given rather than a table, the conditional probability is the probability of “both A\displaystyle A and B\displaystyle B” divided by the probability of B\displaystyle B. “Both A\displaystyle A and B\displaystyle B” is written A∩B\displaystyle A\cap B.

P(A∣B)=P(A∩B)P(B)\displaystyle P(A|B)=\frac{P(A\cap B)}{P(B)}

In the survey: P(A∩B)=120500=0.24\displaystyle {P(A\cap B)}={\frac{120}{500}}={0.24} and P(B)=200500=0.4\displaystyle {P(B)}={\frac{200}{500}}={0.4}.

P(A∣B)=0.240.4=0.6P(A|B)=\frac{0.24}{0.4}=0.6

It is the same result as from the table: both fractions are divided by the same number, 500.

Dependent and independent events

Two events are dependent when knowing that one of them happened changes the probability of the other. They are independent when it does not.

  • In the survey: P(A)=0.45\displaystyle {P(A)}={0.45}, but P(A∣B)=0.6\displaystyle {P(A|B)}={0.6}. The events are dependent – among the pupils who do sport, more sleep 8 hours.
  • Dependence is not necessarily a cause: the survey does not show that sport makes for good sleep. Perhaps a third factor, such as a regular daily routine, affects both.
  • Tossing a coin and the day of the week are independent: on a Sunday and on any other day the probability of heads is 12\displaystyle \frac{1}{2}.

An insurance company looked at 400 drivers:

Had an accidentNo accidentTotal
White car892100
Car of another colour24276300
Total32368400
  • The probability of an accident, of all the drivers: 32400=0.08\displaystyle {\frac{32}{400}}={0.08}.
  • The probability of an accident, of the drivers of white cars: 8100=0.08\displaystyle {\frac{8}{100}}={0.08}.

The probabilities are equal, so by these data the car’s colour and an accident are independent. When events are independent:

P(A∣B)=P(A)\displaystyle P(A|B)=P(A)
A tree diagram with conditional probabilities

In a tree diagram, the probability on a branch of the second stage is a conditional probability: the probability of that outcome given the outcome of the first stage. So the product of the branches along a path is:

P(A∩B)=P(B)⋅P(A∣B)\displaystyle P(A\cap B)=P(B)\cdot P(A|B)

A box holds 12 chocolates: 5 with nuts and 7 without.
Omer takes a chocolate, eats it, and takes another.
The path “both with nuts” is marked in the tree:

  • The first with nuts: 512\displaystyle \frac{5}{12}.
  • The second with nuts, given that the first had nuts: 4 out of 11 are left, that is 411\displaystyle \frac{4}{11}.
  • Both with nuts: 512⋅411=20132=533\displaystyle {\frac{5}{12}\cdot\frac{4}{11}}={\frac{20}{132}}={\frac{5}{33}}.

If the first had no nuts, the probability that the second has nuts is 511\displaystyle \frac{5}{11} – not 411\displaystyle \frac{4}{11}. The second stage depends on the first.

Exercise 1

A study looked at 1,000 people aged 60 and over: who smokes, and who had a lung disease.

IllNot illTotal
Smokers30170200
Non-smokers20780800
Total509501,000
a

A person is chosen at random from all the participants. What is the probability that they were ill?

    / – 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

    b

    What is the probability that a person was ill, given that they smoke?

      / – 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

      c

      What is the probability that a person was ill, given that they do not smoke?

        / – 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

        d

        Are the events “smokes” and “was ill” dependent? Explain using your answers.

        Exercise 2

        In a secondary school, 40% of the pupils sing in the choir.
        12% of the pupils both sing in the choir and play an instrument.

        A pupil who sings in the choir is chosen at random. What is the probability that they play an instrument?

          / – 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 school looked at 600 pupils: who wears glasses, and who was born in winter.

          Wear glassesNo glassesTotal
          Born in winter45105150
          Born in another season135315450
          Total180420600
          a

          A pupil is chosen at random from all the pupils. What is the probability that they wear glasses?

            / – 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

            b

            What is the probability that a pupil wears glasses, given that they were born in winter?

              / – 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

              c

              Are the events “wears glasses” and “was born in winter” dependent? Explain.

              Exercise 4

              A bag holds 3 red marbles and 5 blue ones.
              A marble is taken out and not put back, and another marble is taken out.

              Write the probabilities on the branches and each path’s probability.

              a

              What is the probability that both marbles are red?

                / – 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

                b

                What is the probability that the second marble is red, given that the first is red?

                  / – 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

                  The probability that Avi’s train is late is 0.2\displaystyle 0.2.
                  When the train is late, the probability that Avi misses the start of the meeting is 0.5\displaystyle 0.5.
                  When it is on time, that probability is 0.05\displaystyle 0.05.

                  a

                  What is the probability that the train is late and Avi misses the start of the meeting?

                    / – 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

                    b

                    What is the probability that Avi misses the start of the meeting?

                      / – 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