Conditional Probability
STA1505 - Statistics for Beginners · Probability Concepts
Conditional Probability
Conditional probability is the probability of an event occurring given that another event has already occurred. It is an important concept in statistics, as it allows you to update the probability of an event based on new information.
Definition of Conditional Probability
The conditional probability of event A given event B is denoted as P(A | B). This notation means the probability of A occurring under the condition that B has occurred. The formula for calculating conditional probability is:
P(A | B) = P(A ∩ B) / P(B)
In this formula:
- P(A | B) is the conditional probability of A given B.
- P(A ∩ B) is the probability that both A and B occur.
- P(B) is the probability of event B occurring.
Example of Conditional Probability
Let’s consider a simple example. Suppose we have a deck of cards. There are 52 cards in total, consisting of 26 red cards (hearts and diamonds) and 26 black cards (clubs and spades).
Let event A be the event of drawing a red card, and event B be the event of drawing a heart. We want to find the conditional probability P(A | B).
Step 1: Identify the probabilities needed.
- P(A ∩ B): The probability of drawing a card that is both red and a heart. There are 13 hearts in the deck, so:
P(A ∩ B) = 13 / 52 = 1 / 4
- P(B): The probability of drawing a heart. There are also 13 hearts in the deck, so:
P(B) = 13 / 52 = 1 / 4
Step 2: Apply the conditional probability formula.
P(A | B) = P(A ∩ B) / P(B)
P(A | B) = (1 / 4) / (1 / 4) = 1
This means that if you know the card drawn is a heart, the probability that it is red is 1, or 100%. All hearts are red.
Another Example with Different Events
Let’s consider a different scenario. Suppose a factory produces light bulbs, and 90% of the bulbs are functional, while 10% are defective. We will define the events:
- Event A: The bulb is functional.
- Event B: The bulb is from a specific production batch known to have a 5% defect rate.
We want to find the conditional probability P(A | B), which is the probability that a bulb is functional given that it is from this specific batch.
Step 1: Identify the probabilities needed.
- P(A ∩ B): The probability that a bulb is functional and from the specific batch. Since 5% of the bulbs in that batch are defective, 95% are functional. Thus:
P(A ∩ B) = 0.95
- P(B): The probability of selecting a bulb from the specific batch. We assume this is 1 for simplicity, as we are only considering bulbs from this batch.
Step 2: Apply the formula.
P(A | B) = P(A ∩ B) / P(B)
P(A | B) = 0.95 / 1 = 0.95
This means that if you know the bulb is from that specific batch, there is a 95% chance that it is functional.
Understanding Dependent and Independent Events
Conditional probability is closely related to the concepts of dependent and independent events.
Dependent Events
Two events are dependent if the occurrence of one event affects the probability of the other event. For example, drawing cards from a deck without replacement is a situation where events are dependent. If you draw one card and do not replace it, the probabilities change for the second draw.
Independent Events
Two events are independent if the occurrence of one event does not affect the probability of the other event. For example, flipping a coin and rolling a die are independent events. The outcome of the coin flip does not influence the outcome of the die roll.
Watch out: When dealing with dependent events, remember that the total number of possible outcomes changes after each event.
Using Conditional Probability in Real Life
Conditional probability has many applications in real life. It is used in various fields such as medicine, finance, and risk assessment. For example, in medicine, doctors may use conditional probability to determine the likelihood of a patient having a disease based on test results.
Consider a medical test for a disease that has a 95% accuracy rate. If a patient tests positive, the doctor may want to calculate the probability that the patient actually has the disease, given the test result. This is an application of conditional probability.
Bayes' Theorem
Bayes' Theorem is a fundamental theorem in probability that relates conditional probabilities. It is useful for updating probabilities based on new evidence. The formula for Bayes' Theorem is:
P(A | B) = [P(B | A) * P(A)] / P(B)
In this formula:
- P(A | B) is the conditional probability of A given B.
- P(B | A) is the conditional probability of B given A.
- P(A) is the prior probability of A.
- P(B) is the total probability of B.
This theorem allows you to revise your probability estimates as new information becomes available.
Example of Bayes' Theorem
Suppose a certain disease affects 1% of the population. A test for the disease has a 90% true positive rate (correctly identifies those with the disease) and a 5% false positive rate (incorrectly identifies those without the disease as having it). We want to find the probability that a person has the disease given a positive test result.
Step 1: Identify the probabilities needed.
- P(A): The probability that a person has the disease = 0.01.
- P(B | A): The probability of testing positive given that the person has the disease = 0.90.
- P(B): The total probability of testing positive. This can be calculated using the law of total probability:
P(B) = P(B | A) * P(A) + P(B | not A) * P(not A)
P(B | not A): The probability of testing positive given that the person does not have the disease = 0.05.
P(not A): The probability that a person does not have the disease = 1 - P(A) = 0.99.
Now, substituting the values:
P(B) = (0.90 * 0.01) + (0.05 * 0.99) = 0.009 + 0.0495 = 0.0585
Step 2: Apply Bayes' Theorem.
P(A | B) = [P(B | A) * P(A)] / P(B)
P(A | B) = (0.90 * 0.01) / 0.0585 = 0.009 / 0.0585 ≈ 0.1538
This means that if a person tests positive for the disease, there is approximately a 15.38% chance that they actually have the disease.
Summary
- Conditional probability is the probability of an event given that another event has occurred.
- The formula for conditional probability is P(A | B) = P(A ∩ B) / P(B).
- Dependent events are those where the occurrence of one event affects the other.
- Independent events do not affect each other's probabilities.
- Bayes' Theorem allows for updating probabilities based on new evidence.
Check your understanding
- What is the formula for calculating conditional probability?
- Explain the difference between dependent and independent events.
- How would you apply Bayes' Theorem in a real-world scenario?
- If event A has a probability of 0.4 and event B has a probability of 0.5, what is P(A | B) if P(A ∩ B) is 0.2?