Conditional probabilities
2024-10-02
Consider the situation where two fair dice are tossed and the outcomes on both faces are recorded. Each outcome is assumed to be equally likely to occur.
Definition 1 (Wasserman (2004, p. 10) Definition 1.12) If \(\mathbb{P}\left(B\right)>0\), then the conditional probability of \(A\) given \(B\) is \[\mathbb{P}\left(A|B\right)=\frac{\mathbb{P}\left(AB\right)}{\mathbb{P}\left(B\right)}.\]
We can conclude from the definition that \[\mathbb{P}\left(B|A\right)=\frac{\mathbb{P}\left(A|B\right)\mathbb{P}\left(B\right)}{\mathbb{P}\left(A\right)}\]
In the previous context, \(\mathbb{P}\left(B\right)\) is sometimes referred to as the prior probability and \(\mathbb{P}\left(B|A\right)\) is sometimes referred to as the posterior probability.
In addition, we can also use the definition to obtain the Law of Total Probability. Refer to Wasserman (2004, p. 12) Theorem 1.16.
The idea starts from \(A=(AB) \cup (AB^c)\). Then apply the definition of conditional probability to obtain \[\mathbb{P}\left(A\right)=\mathbb{P}\left(A|B\right)\mathbb{P}\left(B\right)+\mathbb{P}\left(A|B^c\right)\mathbb{P}\left(B^c\right)\]
Suppose there was a diagnostic test for a virus. The false-positive rate (the proportion of people without the virus who get a positive result is one in 1000. You have taken the test and tested positive. What is the probability that you have the virus?
Consider this article about COVID19 around 2020.
Work out the calculations for:
Definition 2 (Wasserman (2004, p. 8) Definition 1.9) Two events \(A\) and \(B\) are independent if \[\mathbb{P}\left(AB\right)=\mathbb{P}\left(A\right)\mathbb{P}\left(B\right).\]
What is the connection to the definition of conditional probability? Refer to Lemma 1.14.
Why do students confuse the two?
Toss a fair die. Let \(A=\{2,4,6\}\) and \(B=\{1,2,3,4\}\). What are \(\mathbb{P}\left(A\right)\), \(\mathbb{P}\left(B\right)\), \(\mathbb{P}\left(AB\right)\)?
Toss a fair die. Let \(A=\{2,4,6\}\) and \(B=\{1,3,5\}\). What are \(\mathbb{P}\left(A\right)\), \(\mathbb{P}\left(B\right)\), \(\mathbb{P}\left(AB\right)\)?
Suppose Ronald and Robert are students in a statistics course. Define \(A\) as the event that Ronald passes the course and \(B\) as the event that Robert passes the course.
Suppose \(\mathbb{P}\left(A\right)=0.9\) and \(\mathbb{P}\left(B\right)=0.7\). What is the probability that both pass the course if
Problem 1.32 of Arias-Castro: Suppose we flip a coin three times in sequence. Assume that any outcome is equally likely. What is the probability that the last toss lands heads if the previous tosses landed heads?
Problem 1.32 of Arias-Castro: Suppose we flip a coin three \(n\geq 2\) times in sequence. Assume that any outcome is equally likely. What is the probability that the last toss lands heads if the previous tosses landed heads?
Definition 3 (Wasserman (2004, p. 8) Definition 1.9) Let \(I\) be an index set. A set of events \(\{A_i: i\in I\}\) is independent if
\[\mathbb{P}\left(\bigcap_{i\in J}A_i\right)=\prod_{i\in J}\mathbb{P}\left(A_i\right)\] for every finite subset \(J\) of \(I\).
Consider the case of tossing 2 fair dice. Assume that the outcomes of the tosses are equally likely.
Let \(A\) be the event that the outcome of the first die is even.
Let \(B\) be the event that the outcome of the second die is even.
Let \(C\) be the event that the sum of the outcomes of the both dice is even.
Two things to do:
Suppose that 30 percent of owners use MacOS, 50 percent use Windows, and 20 percent use Linux.
Suppose that 65 percent of MacOS users have succumbed to a computer virus, 82 percent of Windows users get the virus, and 50 percent of the Linux users get the virus.
We select a person at random and learn that her system was infected by a virus. What is the probability that she is a Windows user?