Conditional probability
"What is the probability that it will rain?" is not the same question as "what is the probability that it will rain, given that the sky is cloudy?". Knowing something about the experiment changes the space of possibilities: you no longer count all the cases, only those that are compatible with what you know. That is the idea of this section, and it is the basis of everything that follows (tree diagrams, tables, Bayes).
What P(A|B) means
At a convention for gaming* fans, a latest-generation console is raffled among the attendees. 120 people from Madrid, 80 from Barcelona and 50 from Valencia take part.…
At a convention for gaming fans, a latest-generation console is raffled among the attendees. 120 people from Madrid, 80 from Barcelona and 50 from Valencia take part. In addition, it is known that 60 % of all participants are under 18 years old. If a winner is chosen at random, calculate:
- a) The sample space associated with the participants' origin.
- b) The probability that the winner is from Madrid.
- c) The probability that the winner is of legal age.
Compound probability: P(A∩B) = P(A)·P(B|A)
Rearranging the definition above gives the formula that is actually used to calculate intersections step by step, especially in successive draws.
An urn contains 5 white balls and 3 black balls. Two balls are drawn successively with replacement (the first ball is returned before taking out the second). Represent…
An urn contains 5 white balls and 3 black balls. Two balls are drawn successively with replacement (the first ball is returned before taking out the second). Represent the situation using a tree diagram and calculate:
- a) The probability that both balls are white.
- b) The probability that the first is black and the second is white.
- c) The probability that both balls are the same colour.
Independent events
Let $A$ and $B$ be two independent events associated with a random experiment, such that $P(A) = 0,4$ and $P(B) = 0,5$. Find the following probabilities: a)…
Let $A$ and $B$ be two independent events associated with a random experiment, such that $P(A) = 0,4$ and $P(B) = 0,5$. Find the following probabilities:
- a) $P(A \cap B)$
- b) $P(A \cup B)$
- c) $P(A|B)$
- d) $P(\bar{A} \cap \bar{B})$
Reading conditional probability from a contingency table
A study is carried out on pet ownership in a group of 100 people. The results are shown in the following contingency table: | | Has a dog ($D$) | Does not have a dog…
A study is carried out on pet ownership in a group of 100 people. The results are shown in the following contingency table:
| Has a dog ($D$) | Does not have a dog ($\bar{D}$) | Total | |
|---|---|---|---|
| Has a cat ($G$) | 15 | 25 | |
| Does not have a cat ($\bar{G}$) | 35 | ||
| Total | 100 |
- a) Complete the contingency table.
- b) If a person is chosen at random, what is the probability that they have both a dog and a cat?
- c) Given that the chosen person has a dog, what is the probability that they also have a cat?
Combined operations and the hard exam case
Exam questions rarely give $P(A|B)$ directly: they usually give $P(A)$, $P(B)$ and $P(\overline A \cap \overline B)$ (or $P(A\cup B)$) and ask you to deduce the rest, as well as to decide whether there is independence.
In a biotechnology laboratory, the resistance of a bacterium to two types of antibiotics, $A$ and $B$, is investigated. It is known that the probability of the bacterium…
In a biotechnology laboratory, the resistance of a bacterium to two types of antibiotics, $A$ and $B$, is investigated. It is known that the probability of the bacterium being resistant to antibiotic $A$ is $P(A) = 0,65$, and the probability of it being resistant to antibiotic $B$ is $P(B) = 0,48$. Furthermore, it has been determined that the probability of it being resistant to neither antibiotic is $12\%$.
Calculate, giving reasons:
- a) The probability that the bacterium is resistant to $A$ given that it is resistant to $B$.
- b) The probability that it is resistant to only one of the two antibiotics.
- c) Are the events "being resistant to $A$" and "being resistant to $B$" independent? Justify your answer with calculations.
Two fair six-sided dice are rolled simultaneously. Calculate the probability of the following events: a) Getting a sum equal to 7. b) Given that an even number was…
Two fair six-sided dice are rolled simultaneously. Calculate the probability of the following events:
- a) Getting a sum equal to 7.
- b) Given that an even number was rolled on the first die, what is the probability that the sum is 7?
- c) Are the events "sum equal to 7" and "first die even" independent? Justify your answer by comparing $P(S=7|Par)$ with $P(S=7)$.
Back to the beginning: Knowing that the sky is cloudy ($N$) restricts the sample space to those days: the probability of rain ($L$) is updated to $P(L|N) = \dfrac{P(L \cap N)}{P(N)}$, a value that is usually much greater than the overall prior probability $P(L)$.