Dependent and Independent Events
You flip a coin and get heads three times in a row. Is tails "due" on the next flip? Now deal two cards from a deck: if the first is an ace, is the second one just as likely to be an ace? In one case the past doesn't matter, and in the other it does. This page shows you how to tell the difference, and how that changes the way you calculate $P(A \cap B)$.
What does independent mean?
Two events are independent when knowing that one happened does not change the probability of the other. If knowing it does change the probability, the events are dependent.
A two-way table (some problems call it a contingency table) is a great place to test independence. Here are 100 students at a high school, sorted by grade and by whether they have a part-time job:
| Juniors | Seniors | Total | |
|---|---|---|---|
| Has a job | 30 | 20 | 50 |
| No job | 30 | 20 | 50 |
| Total | 60 | 40 | 100 |
A survey has been carried out in a high school on the use of two social networks: Instagram ($I$) and TikTok ($T$). The results show that $70\%$ of the students use…
A survey has been carried out in a high school on the use of two social networks: Instagram ($I$) and TikTok ($T$). The results show that $70\%$ of the students use Instagram, $50\%$ use TikTok and $35\%$ use both platforms. Determine whether the use of Instagram is independent of the use of TikTok in this school.
Observe the following contingency table showing the preferred type of sport for a group of 100 teenagers: | | Soccer ($F$) | Basketball ($B$) | TOTAL |…
Observe the following contingency table showing the preferred type of sport for a group of 100 teenagers:
| Soccer ($F$) | Basketball ($B$) | TOTAL | |
|---|---|---|---|
| Boys ($H$) | 45 | 15 | 60 |
| Girls ($M$) | 30 | 10 | 40 |
| TOTAL | 75 | 25 | 100 |
A teenager is chosen at random. Calculate:
- a) $P(F)$, the probability that they like soccer.
- b) $P(F|H)$, the probability that they like soccer knowing that they are a boy.
- c) In view of the results, are the events "being a boy" and "liking soccer" independent?
In a high school in Chicago, a study was conducted on the use of social media platforms and the grade level of the students, obtaining the following data: | | 11th Grade…
In a high school in Chicago, a study was conducted on the use of social media platforms and the grade level of the students, obtaining the following data:
| 11th Grade | 12th Grade | Total | |
|---|---|---|---|
| TikTok | 72 | 48 | 120 |
| 48 | 32 | 80 | |
| Total | 120 | 80 | 200 |
A student is chosen at random. Determine whether the event "preferring TikTok" is independent of the event "being in 11th grade."
The product rule for independent events
For any two events, $P(A \cap B) = P(A)\cdot P(B \mid A)$. When $A$ and $B$ are independent, $P(B \mid A)$ is just $P(B)$, so the rule gets simpler.
The product rule is an area idea. Say Jayden makes a free throw with probability $0.75$ and Emma makes hers with probability $0.60$, independently. Cut a unit square by width for Jayden and by height for Emma. Each region's area is the probability of that combination.
The picture also shows something useful: the other three regions are products too. If $A$ and $B$ are independent, then $A$ and $\overline{B}$ are independent, and so are $\overline{A}$ and $B$, and $\overline{A}$ and $\overline{B}$. (The complement of $A$ is also written $A'$ or $A^c$.)
Let $A$ and $B$ be two events associated with a random experiment. We know that the probability of event $A$ occurring is $P(A) = 0,6$ and the probability of event $B$…
Let $A$ and $B$ be two events associated with a random experiment. We know that the probability of event $A$ occurring is $P(A) = 0,6$ and the probability of event $B$ occurring is $P(B) = 0,3$. If it is known that the events are independent, calculate the probability that both occur at the same time, that is, $P(A \cap B)$.
An 11th-grade student has two exams on the same day: Math and English. The probability of passing Math is $P(M) = 0,7$ and of passing English is $P(I) = 0,8$. Assuming…
An 11th-grade student has two exams on the same day: Math and English. The probability of passing Math is $P(M) = 0,7$ and of passing English is $P(I) = 0,8$. Assuming that passing one exam does not influence the result of the other:
- a) Calculate the probability of passing both exams.
- b) Calculate the probability of passing neither of them.
In a quality control check at a light bulb factory, it is known that the probability of a light bulb being defective is $0,02$. If two light bulbs are chosen at random,…
In a quality control check at a light bulb factory, it is known that the probability of a light bulb being defective is $0,02$. If two light bulbs are chosen at random, calculate the probability that:
- a) Neither is defective.
- b) Both are defective.
(Note: The batch size is so large that the extraction of one light bulb can be considered not to affect the probability of the next).
"At least one" and "exactly one"
Problems about backups, alarms, or multiple chances often ask for "at least one." The shortcut is the complement: "at least one" is everything except "none."
Why does this work? The outcomes "none," "exactly one," and "both" cover all possibilities, so their probabilities add to 1. Computing "none" with a single product is much quicker than adding up everything else.
Two electronic components of a drone, $A$ and $B$, work independently. The probability that component $A$ fails is $0,05$ and the probability that component $B$ fails is…
Two electronic components of a drone, $A$ and $B$, work independently. The probability that component $A$ fails is $0,05$ and the probability that component $B$ fails is $0,08$.
- a) Calculate the probability that the drone can continue flying if it is necessary for at least one of the two components to work correctly.
- b) Calculate the probability that exactly one of the two components fails.
A high school student has two independent alarms on their cell phone. The first ($D_1$) works $95\%$ of mornings and the second ($D_2$) works $90\%$ of the time. a)…
A high school student has two independent alarms on their cell phone. The first ($D_1$) works $95\%$ of mornings and the second ($D_2$) works $90\%$ of the time.
- a) Calculate the probability that the student oversleeps because neither of the two alarms goes off.
- b) If we know that at least one of the alarms has gone off, what is the probability that alarm $D_1$ has failed?
With and without replacement
Drawing from a jar is the cleanest way to see independence and dependence. Everything depends on whether the item goes back.
-
With replacement: the jar is the same for every draw, so draws are independent.
-
Without replacement: the jar changes after each draw, so draws are dependent.
For dependent events we use the general rule:
A few problems use a different deck, so here is how to read it.
Sometimes the unknown is the number of items. Then the probability rule gives you an equation.
In a gumball machine there are balls of three colors: 10 red, 6 blue and 4 green. A child takes out a gumball, notes its color, puts it back into the machine and takes…
In a gumball machine there are balls of three colors: 10 red, 6 blue and 4 green. A child takes out a gumball, notes its color, puts it back into the machine and takes out a second gumball.
- a) Justify whether the events "drawing a red ball first" and "drawing a blue ball second" are dependent or independent.
- b) Calculate the probability that the first gumball is blue and the second is green.
We draw two cards from a 40-card Spanish deck, one after the other and without replacing the first one in the deck. a) What is the probability that the first card is a…
We draw two cards from a 40-card Spanish deck, one after the other and without replacing the first one in the deck.
- a) What is the probability that the first card is a King?
- b) Knowing that the first card was a King, what is the probability that the second is also a King?
- c) Are these events dependent or independent?
An urn contains $n$ white balls and $6$ black balls. Two balls are drawn successively without replacement. Knowing that the probability of both balls being white is…
An urn contains $n$ white balls and $6$ black balls. Two balls are drawn successively without replacement. Knowing that the probability of both balls being white is exactly $\frac{1}{3}$, determine using an algebraic equation how many white balls were initially in the urn.
Tree diagrams
A tree diagram organizes a multi-stage experiment. Each stage is a set of branches. The labels on the second set of branches are conditional probabilities, because they depend on where you came from.
Here is the tree for a bag of $4$ green (G) and $6$ orange (O) jelly beans, drawing two without replacement.
In a drawer in a clothing store fitting room, 4 black socks and 2 white socks were left behind, all of the same size and texture. If a store associate reaches in and…
In a drawer in a clothing store fitting room, 4 black socks and 2 white socks were left behind, all of the same size and texture. If a store associate reaches in and draws two socks at random, one after the other and without looking:
- a) Complete the following tree diagram with the corresponding probabilities.
- b) Calculate the probability that the two socks drawn are black.
An urn contains 5 yellow balls and 3 purple balls. We draw two balls from the urn consecutively and without replacement. a) Draw the tree diagram corresponding to this…
An urn contains 5 yellow balls and 3 purple balls. We draw two balls from the urn consecutively and without replacement.
- a) Draw the tree diagram corresponding to this experiment, indicating the probability of each branch.
- b) Calculate the probability that the two balls drawn are the same color.
We draw two cards from a 40-card Spanish deck, one after the other and without replacing the first. a) What is the probability that the second card is a King, knowing…
We draw two cards from a 40-card Spanish deck, one after the other and without replacing the first.
- a) What is the probability that the second card is a King, knowing that the first card was the Ace of Coins?
- b) What is the probability of obtaining two face cards (Jack, Knight or King) of different suits?
When the second probability depends on the first
Dependence isn't only about jars. Anything where "what happened first" changes the odds works the same way: a player who gets nervous, a game with a streak bonus, a network that gets congested. You just draw the tree with the stated conditional probabilities.
If you want the probability of the second event no matter what happened first, add up both paths that end in it.
A chain of three or more steps works the same way: multiply along the whole path, using the probability that applies at that step.
Sometimes the first stage has more than two possibilities, such as an item that comes from one of three factories. Total probability extends in the obvious way: if $F_1, F_2, F_3$ cover every possibility and don't overlap, add one path for each.
A video game programmer is testing a character's "critical hit" system. The character has a probability of $0,2$ of landing a critical hit ($C$). However, the system is…
A video game programmer is testing a character's "critical hit" system. The character has a probability of $0,2$ of landing a critical hit ($C$). However, the system is designed so that, if the last hit was critical, the probability of the next one also being critical drops to $0,1$ due to the skill's cooldown. If the last hit was not critical, the probability of the next one remains at $0,2$.
- a) Are the events "first critical hit" and "second critical hit" independent? Reason your answer.
- b) Calculate the probability that, in a sequence of two hits, the character does not land any critical hits.
A two-factor authentication security system sends a code to the user's cell phone. If the first message does not arrive (which happens with a probability of $0,12$), the…
A two-factor authentication security system sends a code to the user's cell phone. If the first message does not arrive (which happens with a probability of $0,12$), the system attempts a second delivery. However, due to network congestion, if the first delivery failed, the probability of the second also failing increases to $0,45$. On the other hand, if the first delivery was successful, the probability of the user receiving a second confirmation message is $0,98$.
Calculate the probability that a user receives the second message, regardless of what happened with the first one.
In a popular strategy video game, players open "legendary chests" to obtain rewards. The probability of obtaining an S-tier hero in the first chest is only $0,05$.…
In a popular strategy video game, players open "legendary chests" to obtain rewards. The probability of obtaining an S-tier hero in the first chest is only $0,05$. However, the game has an "accumulated luck" system: if you do not obtain the hero in a chest, the probability of obtaining it in the next one increases by $0,02$ with respect to the probability of the previous chest. If you obtain the hero, the probability returns to $0,05$ for the next attempt.
Calculate the probability that a player needs to open exactly three chests to obtain their first S-tier hero.
Working backward: reverse conditional probability
The tree gives probabilities in order: first stage, then second. But many questions go backward: "Given that the email was flagged, what is the probability it was really spam?" To reverse the condition, use
$$P(A \mid B) = \frac{P(A \cap B)}{P(B)}$$with $P(B)$ found from all the paths that end in $B$. This reverse step is often called Bayes' theorem.
Sometimes the condition covers more than one path. Then the denominator adds all of them.
The same idea works with three sources. In the headphones example, given that a pair is defective, the chance it came from $F_3$ is $\dfrac{0.010}{0.021} \approx 0.476$.
In a basketball training session, a player shoots two consecutive free throws. The probability of scoring the first is $0,7$. If they score the first, their confidence…
In a basketball training session, a player shoots two consecutive free throws. The probability of scoring the first is $0,7$. If they score the first, their confidence increases and the probability of scoring the second is $0,8$. If they miss the first, they get nervous and the probability of scoring the second drops to $0,4$.
If we know that the player has scored only one of the two shots, what is the probability that it was the second one?
In an intelligence center, facial recognition software analyzes images. The probability that it correctly identifies an individual if they are in the database is $0,95$.…
In an intelligence center, facial recognition software analyzes images. The probability that it correctly identifies an individual if they are in the database is $0,95$. However, the software has a margin of error and sometimes incorrectly identifies people who are not in the database with a probability of $0,02$.
Knowing that only $1\%$ of the people passing through customs are in the database, calculate:
- a) The probability that the software gives an alert (identifies someone).
- b) If the software has identified a person, what is the probability that they are actually in the database?
Three pharmaceutical laboratories ($L_1$, $L_2$ and $L_3$) manufacture the same type of antigen test. $L_1$ produces $45\%$ of the total, $L_2$ produces $30\%$ and $L_3$…
Three pharmaceutical laboratories ($L_1$, $L_2$ and $L_3$) manufacture the same type of antigen test. $L_1$ produces $45\%$ of the total, $L_2$ produces $30\%$ and $L_3$ produces the rest. It is known that the percentage of defective tests is $1\%$ for $L_1$, $2\%$ for $L_2$ and $3\%$ for $L_3$.
If we choose two tests at random from a large batch where all manufacturers are mixed (you can consider the extraction to be with replacement due to the large volume):
- a) What is the probability that both are defective?
- b) Knowing that the first one was defective, what is the probability that the second one is also defective? Justify whether these events are dependent or independent.
Finding probabilities from partial information
Often you are given $P(A)$, $P(B)$, and maybe $P(A \cup B)$, and have to build the rest. The key tool is the union formula:
$$P(A \cup B) = P(A) + P(B) - P(A \cap B)$$From the picture: the part of $A$ outside $B$ is $P(A \cap \overline{B}) = P(A) - P(A \cap B)$. That gives you conditional probabilities with a complement, such as $P(A \mid \overline{B}) = \dfrac{P(A \cap \overline{B})}{P(\overline{B})}$.
The overlap can't be just anything. It can't be bigger than the smaller event, and the union can't exceed $1$:
$$\max\{0,\ P(A) + P(B) - 1\} \le P(A \cap B) \le \min\{P(A),\ P(B)\}$$If $P(A) + P(B) > 1$, then $P(A \cap B)$ must be positive, so $A$ and $B$ can never be mutually exclusive.
On a music streaming platform, $60\%$ of users listen to the "Urban" genre ($U$) and $45\%$ listen to "Pop" ($P$). It is also known that $27\%$ of users listen to both…
On a music streaming platform, $60\%$ of users listen to the "Urban" genre ($U$) and $45\%$ listen to "Pop" ($P$). It is also known that $27\%$ of users listen to both musical genres.
- a) Determine whether the events "listening to Urban" and "listening to Pop" are independent. Justify your answer mathematically.
- b) If we select a user who we know listens to "Pop" music, what is the probability that they also listen to "Urban"?
Let $A$ and $B$ be two events in a sample space such that $P(A) = 0,4$, $P(B) = 0,3$ and $P(A \cup B) = 0,58$. a) Calculate $P(A \cap B)$. b) Determine whether events…
Let $A$ and $B$ be two events in a sample space such that $P(A) = 0,4$, $P(B) = 0,3$ and $P(A \cup B) = 0,58$.
- a) Calculate $P(A \cap B)$.
- b) Determine whether events $A$ and $B$ are independent.
- c) Calculate the conditional probability $P(A | \bar{B})$, where $\bar{B}$ is the complementary event of $B$.
Two events $A$ and $B$ satisfy $P(A) = 0,6$ and $P(B) = 0,7$. Determine the interval of possible values for the probability of the intersection $P(A \cap B)$ and, based…
Two events $A$ and $B$ satisfy $P(A) = 0,6$ and $P(B) = 0,7$. Determine the interval of possible values for the probability of the intersection $P(A \cap B)$ and, based on this, reason why the events $A$ and $B$ can never be incompatible. What value should $P(A \cap B)$ have for $A$ and $B$ to be independent?
Several events at once
With three or more events, checking pairs isn't enough.
When outcomes are equally likely, you can test independence by counting the sample space. Roll two fair six-sided dice, so there are $36$ equally likely outcomes.
Also notice that the two dice themselves are independent: all outcome pairs are equally likely, so for any faces $i$ and $j$, $P(\text{first} = i \cap \text{second} = j) = P(\text{first} = i)\cdot P(\text{second} = j)$. This holds for a die with any number of faces.
Two tetrahedral dice (faces numbered 1 to 4) are rolled. Let the events be: $A$: "The sum of the faces is a prime number". $B$: "The product of the faces is a multiple…
Two tetrahedral dice (faces numbered 1 to 4) are rolled. Let the events be:
-
$A$: "The sum of the faces is a prime number".
-
$B$: "The product of the faces is a multiple of 4".
-
$C$: "At least one of the dice shows a 1".
Study the independence of events $A$ and $B$, and of events $B$ and $C$. Is there any relationship of dependence between the result of the first die and the result of the second? Explain it mathematically.
Back to the start: tails is not due after three heads, because flips are independent. But the second card is less likely to be an ace after the first ace, because the deck changed. That change in the second probability is exactly what separates dependent events from independent ones.