Conditional Probability and Independence Between Events
Summary
In this session, we will explore the concept of conditional probability and the interaction between events. We will acquire the skills to calculate conditional probabilities and determine the dependence or independence between events. We will apply practical examples, such as the study of the prevalence of cavities in candy consumers, to illustrate these concepts. By the end, you will have a clear understanding of how to apply conditional probability and analyze dependent and independent events.
LEARNING OBJECTIVES:
By the end of this class, you will be able to:
- Understand the definition of conditional probability and its relationship with the intersection of events and individual probabilities.
- Identify positive and negative associations between events by comparing conditional probabilities.
- Test the independence between different events.
TABLE OF CONTENTS
CONDITIONAL PROBABILITY
FORMAL DEFINITION OF CONDITIONAL PROBABILITY
RELATIONSHIP BETWEEN EVENTS
INDEPENDENCE BETWEEN EVENTS AND COMPLEMENTS OF EVENTS
Conditional Probability
What is the probability that event A occurs given that B has already occurred? The calculation of such probabilities involves the concept of conditional probability. In what follows, we will study conditional probability, its definition, and how from this we infer the relationships of dependence and independence between events.
Suppose we want to measure the prevalence of cavities among regular candy consumers. If we examine a sample space formed of N people \Omega_N, we will see that it can be divided into four subsets:
- A:=\left\{ {People\;who\;have\;cavities}\right\}
- A^c:=\left\{{People\;who\;DO\;NOT\;have\;cavities}\right\}
- B:=\left\{ {People\;who\;eat\;candy\;regularly}\right\}
- B^c:=\left\{{People\;who\;DO\;NOT\;eat\;candy\;regularly}\right\}
From this, it is clear that A\cup A^c = \Omega_N and B\cup B^c = \Omega_N, but A\cap B is not necessarily empty. The general scenario is represented by the following figure:
So, if we remember the definition of probability as the limit of relative frequencies, we can say that the probability that a person has cavities given that they consume candy, P(A|B) will be:
P(A|B) =\displaystyle \frac{\#(A\cap B)}{\#B}
On the other hand, it holds that:
P(A\cap B) = \displaystyle \frac{\#(A\cap B)}{\#\Omega_N}
↳ \#(A\cap B) = \#\Omega_N P(A\cap B)
P(B) =\displaystyle \frac{\#B}{\#\Omega_N}
↳ \#B = \#\Omega_N P(B)
So if we replace these last two expressions in P(A|B), we get:
P(A|B) = \displaystyle \frac{\#\Omega_N P(A\cap B)}{\#\Omega_N P(B)} = \frac{P(A\cap B)}{P(B)}
With this, we have the following definition:
Formal Definition of Conditional Probability
DEFINITION: The probability of A, given that B has occurred, P(A|B), is defined as:
P(A|B) = \displaystyle \frac{P(A\cap B)}{P(B)}■
In everyday thinking, there is often confusion between P(A|B) and P(B|A). To shed light on this difference, let us review an example based on an extreme case: Note that while all footballers have two legs, only a tiny fraction of people with two legs are footballers.
Relationship Between Events
Continuing with the example of the prevalence of cavities among people who regularly consume candy. If consuming candy makes people more prone to getting cavities, then it should occur that:
P(A|B) \gt P(A).Here we have that B boosts A and therefore we say that there is a positive association between the events.
If, on the contrary, consuming candy prevents cavities, then it should occur that:
P(A|B) \lt P(A).In this case, B inhibits A and therefore we say that there is a negative association between the events.
And if there is no relationship between these two events, neither positive nor negative, then it should occur that:
P(A|B) = P(A).From here, the inference is made that in most probability texts is presented as a definition:
| P(A|B) = P(A) | |
| \equiv | \displaystyle \frac{P(A\cap B)}{P(B)} = P(A) |
| \equiv | P(A\cap B)= P(A) P(B) |
This reasoning shows us the relationship between conditional probability and the independence of events.
DEFINITION: Given two events A and B, they are said to be independent if they satisfy the relationship:
\color{black}{P(A\cap B)= P(A) P(B)}■
Independence Between Events and Complements of Events
The independence between two events A and B is proven to be equivalent to the independence of A with B^c, the independence of A^c with B, and the independence of A^c with B^c.
PROOF
| (1) | \{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B) = P(A)P(B) | ; Assumption |
| (2) | \{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B^c) = P(A\setminus B) | ; because A\cap B^c := A\setminus B |
| (3) | \{P(A\cap B) = P(A)P(B)\}\vdash P(A\setminus B)= P(A) - P(A\cap B) | ; See development of exercise 2 |
| (4) | \{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B^c)= P(A) - P(A\cap B) | ; From (2) and (3) |
| (5) | \{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B^c)= P(A) - P(A)P(B) | ; From (1) and (4) |
| \{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B^c)= P(A)(1 -P(B)) | ; Factoring by P(A) | |
| \color{red}{\{P(A\cap B) = P(A)P(B)\}\vdash P(A\cap B^c)= P(A)P(B^c)} | ; see development of exercise 1 |
This last expression is read as: “From the fact that A and B are independent, it is inferred that A and B^c are also independent.
The proof in the reverse sense is done similarly.
| (1) | \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A\cap B^c) = P(A)P(B^c) | ; Assumption |
| \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A\cap B^c) = P(A)(1 - P(B)) | ; see development of exercise 1 | |
| \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A\cap B^c) = P(A) - P(A)P(B) | ; Performing the product of the parenthesis on the right side. | |
| (2) | \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A\cap B^c) = P(A\setminus B) | ; Because A\setminus B := A\cap B^c. |
| (3) | \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A\setminus B) = P(A) - P(A\cap B) | ; See development of exercise 2 |
| (4) | \{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A) - P(A)P(B) = P(A) - P(A\cap B) | ; From (1), (2) and (3) |
| \color{red}{\{P(A\cap B^c) = P(A)P(B^c)\}\vdash P(A)P(B) = P(A\cap B)} | ; Eliminating similar terms |
And this expression is read as: “From the fact that A and B^c are independent, it is inferred that A and B are also independent.
Finally, from these two reasonings, the equivalence between the independence of A with B and that of A with B^c is proven.
The other proven equivalences can be obtained similarly. These will be left as a challenge for the reader >:D
