2.1.3.2 - Combinations of Events
2.1.3.2 - Combinations of EventsIn situations with two or more categorical variables there are a number of different ways that combinations of events can be described: intersections, unions, complements, and conditional probabilities. Each of these combinations of events is covered in your textbook. However, note that your textbook does not use the symbols that are most commonly used when discussing these combinations of events. The symbols that we will be using are in the table below. In this section, you will also learn about disjoint events and independent events.
Combination | Symbol | Definition |
---|---|---|
Disjoint | Never occurring together | |
Independent | Unrelated | |
Intersection | \(P(A\cap B)\) | Probability of A and B |
Union | \(P(A\cup B)\) |
Probability of A or B Note: This includes the possibility of A and B |
Complement | \(P(A^C)\) | The probability of NOT A |
Conditional | \(P(A\mid B)\) | The probability of A given B |
2.1.3.2.1 - Disjoint & Independent Events
2.1.3.2.1 - Disjoint & Independent EventsDisjoint events and independent events are different. Events are considered disjoint if they never occur at the same time; these are also known as mutually exclusive events. Events are considered independent if they are unrelated.
Disjoint Events
Disjoint events are events that never occur at the same time. These are also known as mutually exclusive events.
These are often visually represented by a Venn diagram, such as the below. In this diagram, there is no overlap between event A and event B. These two events never occur together, so they are disjoint events.
Example: First-Year & Sophomore Students
Let's consider undergraduate class level. A student can be classified as a first-year student, sophomore, junior, or senior.
Being a first-year student and being a sophomore are disjoint events because an individual cannot be classified as both at the same time.
Independent Events
Independent events are unrelated events. The outcome of one event does not impact the outcome of the other event. Independent events can, and do often, occur together.
The following examples use stacked bar charts to demonstrated what two variables that are and are not independent look like in relation to one another.
Example: Penguin Species & Biological Sex
The segmented bar chart above displays data from a research study concerning penguins (see Palmer Penguins). Within each of the three species of penguin, half of the penguins are male and half are female. In this sample, penguin species and biological sex are independent. Knowing the species of a penguin does not change the probability that they are male or female. And, knowing the biological sex of a penguin does not change the probability that it is an Adelie, Chinstrap, or Gentoo penguin.
Non-Example: Enrollment Status by Campus
The segmented bar chart above displays data concerning Penn State students' status as full- or part-time and their primary campus (data from Penn State's Factbook). The proportion of students who are part-time is different at each campus. Only 2.7% of University Park students are enrolled part-time while 69.2% of World Campus students are enrolled part-time. Enrollment status and primary campus are not independent. If we know a student's campus, that changes the probability of them being a full- or part-time student. If we know that a student is full- or part-time, that chances the probability that they came from a specific campus.
2.1.3.2.2 - Intersections
2.1.3.2.2 - IntersectionsThe term intersection is used to describe the overlap or two or more events. This is communicated using the character ∩. The phrase \(P(A \cap B)\) is read as "the probability of A and B."
In the form of a Venn diagram, we can picture this as the overlap between two [or more] events.
Example: Cards
What is the probability of randomly selecting a card from a standard 52-card deck that is a red card and a king?
There are 2 kings that are red cards: the king of hearts and the king of diamonds.
\(P(red \cap king)=\dfrac{2}{52}=.0385\)
Example: Penn State Enrollment
The two-way contingency table below displays the Penn State's undergraduate enrollments from Fall 2019 in terms of status (full-time and part-time) and primary campus (data from the Penn State Factbook).
Full-Time | Part-Time | Total | |
---|---|---|---|
University Park | 39529 | 1110 | 40639 |
Commonwealth Campuses | 24306 | 2794 | 27100 |
PA College of Technology | 4110 | 871 | 4981 |
World Campus | 2574 | 5786 | 8360 |
Total | 70519 | 10561 | 81080 |
What proportion of Penn State students were full-time University Park students?
This is an example of a union because we are looking for the proportion of all students who are both full-time and University Park.
\(P(FullTime \cap UniversityPark)=\dfrac{39529}{81080}=0.488\)
What proportion of Penn State students were part-time World Campus students?
This is an example of a union because we are looking for the proportion of all students who are both part-time and World Campus.
\(P(PartTime \cap WorldCampus) = \dfrac{5786}{81080}=0.071\)
2.1.3.2.3 - Unions
2.1.3.2.3 - UnionsA union is communicated using the symbol ∪. \(P(A \cup B)\) is read as "the probability of A or B." Note that in mathematics, "or" means "and/or." The Venn diagram below depicts the union of A and B.
If the values of P(A), P(B), and P(A ∩ B) are all known, the formula below can be used to compute the union of A and B. Conceptually, the union of A and B is equal to A plus B minus the overlap of A and B.
- Union
- \(P(A\cup B) = P(A)+P(B)-P(A\cap B)\)
Example: Hearts or Spades
What is the probability of randomly selecting a card from a standard 52-card deck that is a heart or spade?
In a standard 52-card deck, 13 cards are hearts, 13 cards are spades, and no cards are both a heart and a spade.
\(P(heart) = \dfrac{13}{52}\)
\(P(spade) = \dfrac{13}{52}\)
\(P(heart \cap spade) = \dfrac{0}{52}\)
Using the formula given above:
\(P(heart \cup spade)=\dfrac{13}{52}+\dfrac{13}{52}-\dfrac{0}{52}= \dfrac {26}{52}=0.5\)
Example: Hearts or Aces
What is the probability of randomly selecting a card from a standard 52-card deck that is a heart or an ace?
In a standard 52-card deck, 13 cards are hearts and 4 cards are aces. There is one ace of hearts.
\(P(heart) = \dfrac{13}{52}\)
\(P(ace) = \dfrac{4}{52}\)
\(P(heart \cap ace) = \dfrac{1}{52}\)
Using the formula given above:
\(P(heart \cup ace)=\dfrac{13}{52}+\dfrac{4}{52}-\dfrac{1}{52}=\dfrac{16}{52}=0.308\)
Example: Part-Time or World Campus
The two-way contingency table below displays the Penn State's undergraduate enrollments from Fall 2019 in terms of status (full-time and part-time) and primary campus (data from the Penn State Factbook).
Full-Time | Part-Time | Total | |
---|---|---|---|
University Park | 39529 | 1110 | 40639 |
Commonwealth Campuses | 24306 | 2794 | 27100 |
PA College of Technology | 4110 | 871 | 4981 |
World Campus | 2574 | 5786 | 8360 |
Total | 70519 | 10561 | 81080 |
What proportion of all students are part-time students or World Campus students?
When we have a contingency table, we can take the appropriate values from the table as opposed to using the formula given above. In this table there are 1110 part-time University Park students, 2794 part-time Commonwealth Campus students, 871 PA College of Technology students, 5786 part-time World Campus students, and 2574 full-time World Campus students. Combined, these are all of the cells this question is asking about.
\(P(PartTime \cup WorldCampus)=\dfrac{1110+2794+871+5786+2574}{81080}=\dfrac{13135}{12242}=0.162\)
Note that the final answer would be the same if we had used the formula:
\(P(PartTime \cup WorldCampus) = \dfrac{10561}{81080}+\dfrac{8360}{81080}-\dfrac{5786}{81080}= \dfrac{13135}{81080}=0.162\)
2.1.3.2.4 - Complements
2.1.3.2.4 - ComplementsThe complement of an event is the probability that the event does not occur. The complement of \(P(A)\) is written as \(P(A^C)\) or \(P(A')\).
In the diagram below, we can see that \(A^{C}\) is everything in the sample space that is not A.
Mathematically, if we know \(P(A)\), we can use that value to compute \(P(A^{C})\) using the following formula.
- Complement of A
- \(P(A^{C})=1−P(A)\)
Example: Coin Flip
When flipping a coin, one can flip heads or tails. Thus, \(P(Tails^{C})=P(Heads)\) and \(P(Heads^{C})=P(Tails)\)
Example: Hearts
If you randomly select a card from a standard 52-card deck, you could pull a heart, diamond, spade, or club. The complement of pulling a heart is the probability of pulling a diamond, spade, or club. In other words: \(P(Heart^{C})=P(Diamond,\; Spade,\;\;Club)\)
Example: Rain
According to the weather report, there is a 30% chance of rain today: \(P(Rain) = .30\)
Raining and not raining are complements.
\(P(Not \:rain)=P(Rain^{C})=1-P(Rain)=1-.30=.70\)
There is a 70% chance that it will not rain today.
The sum of all of the probabilities for possible events is equal to 1.
Example: Cards
In a standard 52-card deck there are 26 black cards and 26 red cards. All cards are either black or red.
\(P(red)+P(black)=\frac{26}{52}+\frac{26}{52}=1\)
Example: Dominant Hand
Of individuals with two hands, it is possible to be right-handed, left-handed, or ambidextrous. Assuming that these are the only three possibilities and that there is no overlap between any of these possibilities:
\(P(right\;handed)+P(left\;handed)+P(ambidextrous) = 1\)
2.1.3.2.5 - Conditional Probability
2.1.3.2.5 - Conditional ProbabilityA conditional probability is the probability of one event occurring given that a second event is known to have occurred. This is communicated using the symbol \(\mid\) which is read as "given." For example, \(P(A\mid B)\) is read as "Probability of A given B."
A conditional probability can be computed using a two-way contingency table. In the examples below, note that we're only interested in the events in one row or column.
Example: PA Resident given Undergraduate
The two-way contingency table below displays Penn State World Campus enrollments from Fall 2019 in terms of academic level (undergraduate and graduate) and state residency (Pennsylvania and non-Pennsylvania).
Pennsylvania | Non-Pennsylvania | Total | |
---|---|---|---|
Undergraduate | 3757 | 4603 | 8360 |
Graduate | 2253 | 4074 | 6327 |
Total | 6010 | 8677 | 14687 |
Given an individual is an undergraduate student, what is the probability they are a Pennsylvania resident?
We know the individual is an undergraduate student, so we will only look at the row containing the 8360 undergraduate students. Of those 8360 undergraduate students, 3757 were Pennsylvania residents.
\(P(PA \mid Undergrad) = \dfrac{3757}{8360}=0.449\)
Given an individual is a Pennsylvania resident, what is the probability they are an undergraduate student?
Note that most cases, \(P(A\mid B) \ne P(B \mid A)\). This question is different from the first question because the two events are flipped. Here, we know the individual is a Pennsylvania resident, we we will only look at the column containing the 6010 Pennsylvania residents. Of those 6010 Pennsylvania residents, 3757 were undergraduate students.
\(P(Undergrad \mid PA) = \dfrac{3757}{6010}=0.625\)
What proportion of graduate students are Pennsylvania residents?
This question is worded slightly differently, but it is also a conditional probability. This translates to \(P(PA \mid Graduate)\). Of the 6327 graduate students, 2253 were Pennsylvania residents.
\(P(PA \mid Graduate) = \dfrac{2253}{6327}=0.356\)
Sensitivity & Specificity
Sensitivity and specificity are two specific types of conditional probabilities that are often applied in situations involving testing (e.g., medical testing for a given condition). Sensitivity is the probability of testing positive given that one actually has the condition. Specificity is the probability of testing negative given that one actually does not have the condition. Ideally, we would like both sensitivity and specificity rates to be high.
Example: Sensitivity & Specificity
Compute the sensitivity and specificity of the test data presented in the following two-way contingency table.
Actually Sick | Actually Healthy | Total | |
---|---|---|---|
Tested Positive | 15 | 5 | 20 |
Tested Negative | 2 | 19 | 21 |
Total | 17 | 24 | 41 |
Sensitivity is the proportion of all people who were actually sick who tested positive. As a conditional probability, \(P(positive \mid sick)\). There were 17 people in the sample who were actually sick. Of those, 15 tested positive.
\(Sensitivity = \dfrac{15}{17}=0.882\)
Specificity is the proportion of all people who were actually healthy who tested negative. As a conditional probability, \(P(negative \mid healthy)\). There were 24 people in the sample who were actually healthy. Of those, 19 tested negative.
\(Specificity = \dfrac {19}{24}=0.792\)
2.1.3.2.5.1 - Advanced Conditional Probability Applications
2.1.3.2.5.1 - Advanced Conditional Probability ApplicationsAdvanced Formulas
Conditional probabilities can also be computed using the following formulas. Note that these two formulas are identical, but A and B are switched. Again, if the contingency table is available it is usually most efficient to take the appropriate values from the table, as shown above, as opposed to using these formulas.
- Conditional Probability of A Given B
- \(P(A\mid B)=\dfrac{P(A \: \cap\: B)}{P(B)}\)
- Conditional Probability of B Given A
- \(P(B\mid A)=\dfrac{P(A \: \cap\: B)}{P(A)}\)
Example: Clubs
In a standard 52-card deck, there are 26 black cards including 13 clubs. All clubs are black, therefore there are 13 black clubs.
What is the probability that a randomly selected card is a club given that it is a black card?
We are given that \(P(club)=\frac{13}{52}=0.25\), \(P(black)=\frac{26}{52}=0.50\), and \(P(club \: \cap\: black)=\frac{13}{52}0.25\)
\(P(club\mid black)=\dfrac{P(club \: \cap\: black)}{P(black)}=\dfrac{0.25}{0.50}=0.50\)
Given that a randomly selected card is black, there is a 50% chance that it's a club.
Independent Events Written as Conditional Probabilities
If events A and B are independent then \(P(A) = P(A \mid B)\). In other words, whether or not event B occurs does not change the probability of event A occurring.
Example: Checking for Independence, Aces and Hearts
A card is randomly drawn from a 52-card deck. Are the events of drawing an ace and drawing a heart independent?
In a standard 52-card deck, there are 4 aces and 13 hearts. Therefore \(P(ace)=\frac{4}{52}\) and \(P(heart)=\frac{13}{52}\). Out of 13 hearts, 1 is an ace, which translates to \(P(ace \mid heart) = \frac{1}{13}\).
To determine if these two events are independent we can compare \(P(A)\) to \(P(A\mid B)\). If we call being an ace event A and being a heart event B, then we're comparing \(P(ace)\) to \(P(ace \mid heart)\).
\(P(ace)=\frac{4}{52}=0.0769\)
\(P(ace \mid heart) = \frac{1}{13}=0.0769\)
These values are identical, therefore we can conclude that the events of drawing an ace and drawing a heart are independent.