Introduction to Probability
Axioms of Probability
Suppose we have some experiment, any procedure that can be repeated and has a well-defined set of outcomes.
We define the set of all possible outcomes for the experiment to be the sample space . Any subset of outcomes from this sample space is known as an event.
The null event, denoted , is the set with no elements.
Example: Sample Spaces and Events
Suppose we roll a 6-sided die. Then, we would have sample space:
Any subset of this sample space would be a valid event for this experiment. Some events include:
Suppose we have events .
A probability function is a function satisfying the following axioms of probability:
- Bounds of Probability: Probability must be given as a number between 0 and 1.
- Cumulative Probability: Probability of the set of all outcomes must equal 1.
- Pairwise Disjoint Events: If events are pairwise disjoint, then the probability of their union must equal the summation of individual probabilities
Example: Applying Axioms of Probability
You flip a two-sided coin, and the probability of heads is . How can we use the axioms of probability to justify the probability of ?
We know that the set of all outcomes . We use the axioms of probability to justify .
We know by the axioms that . Furthermore, we know that and are disjoint events, and their union forms our sample space .
From these axioms of probability, we can also derive the following properties of probability. Let be events of sample space . Then,
- If , then
Proof (Property 2)
We know that
Moreover, we know the empty set is pairwise disjoint with itself.
Thus, it must be true that
Thus, , which is only possible if .
Proof (Property 3)
Let denote the set of elements in , but not in . Then,
Because these sets are mutually exclusive, we can apply the third axiom
Adding to both sides, we obtain
Which, after applying axiom 3, gives us
Note that the third property can be extended for any number of sets. For example, on 3 sets , we have
This is generalized to sets in the following theorem.
Theorem: Inclusion-Exclusion Theorem
If , then
Alternative Definition
We can think about this another way.
Let . Denote , with .Then where is the power set of , and is the magnitude of .
For example, when , we have , giving us
By Demorgan’s Law, this becomes
Which is the definition often used in combinatorics.
Example: Inclusion-Exclusion Theorem
A person visits the dentist. There is a 0.7 chance a cavity is filled, 0.2 a tooth is extracted, and 0.1 chance that both occur.
What is the probability in a visit that neither occur?
If is the event of a cavity, and is the event of an extraction, then
Calculating Probability
We often focus on the case the sample space is finite.
In the case every element has equal chance, we have for any event ,
In other words, the probability of the event is equal to all ways the event can occur, divided by the total number of outcomes.
See the below examples.
Example: Calculating Probability (1)
A coin is flipped 10 times. What is the probability of getting exactly 3 heads?
To find the number of outcomes where we have 3 heads, choose 3 “coins” to be heads.
Furthermore, as every position can either be heads or tails, our total number of outcomes is equal to
This gives us probability
Example: Calculating Probability (2)
There are 10 cats, 7 dogs, and 5 mice. Four animals are chosen at once.
What is the probability we get at most 1 mouse?
Let’s first find the number of outcome we have. Let’s count the cases where we have either 0 or 1 mice.
- For 0 mice, we choose 4 animals from our remaining 17 available .
- For 1 mouse, we choose 3 animals from our remaining 17 available .
Adding these cases together, we have number of outcomes
Let’s now find the number of total outcomes. Out of our 22 animals, we choose 4 of them, giving us
Combining these results, we get probability
Example: Calculating Probability (3)
If labeled balls are placed in labeled boxes, what is the probability that exactly 1 box is empty?
If one box must be empty and the others with balls, there must be exactly 1 box with 2 balls, the others having 1 ball.
To find the number of outcomes where exactly 1 box is empty, we first choose one of boxes to be empty. Then, we choose another box from our remaining boxes to place a distinct pair of balls . Finally, we permute the remaining balls in the other boxes.
To find the total number of outcomes, we observe that every ball can be in any of the boxes, so we have total number of outcomes
Giving us probability
In some cases may be uncountable, but we can still find the probability. See the below example.
Example: Calculating Probability - Uncountable Sets
As an extremely simple example, let . While we may not be able to find the probability of one specific number (say, ), we can easily find the probability of a range of numbers.
Let . Then,
Theorem: Probability with Uncountable Sets
Let be events in . Then
The union of the events is equal to the largest event , as the rest are subsets of .
The intersection of the events is equal to the smalest event , as is the only event which is a subset of all the others.
Proof (Property 1)
Let , where indicates the set of elements in not in .
These are disjoint sets whose union form . In other words,
Applying the axioms of probability,
Finally, we can convert the summation to a limit and convert back in terms of .
Note that the proof for property 2 is quite similar to this one.
Example: Probability with Uncountable Sets
- At 11:59, balls labeled 1 to 10 are put into a box. One ball is removed at 11:59:30.
- At 11:59:30, balls labeled 11 to 20 are put into the box. One ball is removed at 11:59:45.
- At 11:59:45, balls labeled 21 to 30 are put into the box
- …
At 12:00, how many balls are in the box?
Let denote the event in which ball survives step . Then,
Combining these, we find as the event in which ball 1 survives till 12:00.
Because , we apply our previous theorem to find
Let . Then,
Which is bounded by the harmonic series!
Because the harmonic series diverges, this forces.
Thus, .
Now let be the event where ball survives till 12:00. If we perform the same process for any ball, we can see that we’re only just dropping terms from the harmonic set, which still diverges. This holds for any ball, so if is the event that at least 1 ball survives, then
Thus, at 12:00, no balls would remain in the box!
Conditional Probability
Introduction to Conditional Probability
Let be events, where .
The conditional probability of given (“probability of given ”) is given as
Conditional probability essentially has the effect of restricting our sample space to that of .
We have the following properties of conditional probability:
- Bounds of Probability: Just like any other probability, conditional probability must also be a value from 0 to 1.
- Cumulative Probability: The probability of the sample space given is 1, as everything in is in .
- Pairwise Disjoint Events: If are pairwise disjoint events, then
Info: Proof (Property 3)
By definition of conditional probability,
We then apply the distributive property to obtain
Because the ‘s by assumption are disjoint, then it must be true that the ‘s are also disjoint. Applying our probability axiom, we obtain
Let’s see some conditional probability examples.
Example: Conditional Probability (1)
A loaded 6-sided die has an odd number occurring twice as likely as even. Determine the number is a perfect square, given the value is larger than 3.
Let denote the event of a perfect square, and let denote the event of a number larger than 3.
We see that .
Let be the probability that we roll an even number. Then,
Thus, the probability of rolling an even number is , and an odd number .
We find our answer as
Conditional Probability (2)
There are 7 black socks, 5 white socks. The socks are distinct, and we take 2, one at a time, without replacement.
What is the probability that both socks are black?
This question is a conditional probability question in disguise, as it asks for the probability of a black sock given the first is black as well.
Let denote the event that the first sock is black, and denote the event that the second sock is black.
We want , which is actually equivalent to .
Using conditional probability, we can also calculate the probability of intersections.
Multiplicaton Rule
Let , where .
Then,
This is known as the multiplication rule.
Independence of Events
Let and be events. We say and are independent if .
Otherwise the events are dependent.
In particular, if , then being independent implies
In other words, occurring does not affect the probability of .
Example: Independence
We draw 2 cards from a deck of cards without replacement. If is the event of drawing a spade on the first draw, and is the event of drawing a spade on the second draw, are and independent?
We find that
To find , we need to do a case analysis.
Adding these two cases together, we find .
Now, we find
Which is not equal to
So these events are dependent, which is to be expected - directly affects the set of outcomes of .
Independence does not necessarily mean the events lack a common intersection. See the below example.
Example: Independence Misconceptions
We toss a coin 3 times. Let be the event a head () occurs on toss 1 and 2, and let be the event a tails () occurs on toss 3.
Thus, and , and the total number of outcomes is . This gives us probabilities
Furthermore, we see that their intersection has one outcome, giving us
We see that despite having a common intersection, these events are actually independent of one another.
Mathematical independence is not the same as the independence we’re commonly used to.
We can generalize this concept of independence to multiple events. Say we have many events . Then, they are all independent if
In other words, the probability of their common intersection equals the product of their individual probabilities. Note that to guarantee independence, we have to check every possible combination of interactions of these sets.
Alternatively, are pairwise independent if
Note that independence of sets implies their pairwise independence, but the converse is not true.
Example: Independence vs. Pairwise Independence
Conider 4 labeled balls, and pick one.
Let , , and . Now, note that
Thus, are pairwise independent.
However, because
The events are not independent.
Theorem: Independence of Complements
Let be events. Then are independent if and only if and are independent.
Proof
Suppose that and are independent. By definition, we know that . Applying this definition, we see that
We can easily reverse this argument to prove the other direction.
Understanding independence is extremely important, as it may let us solve problems that we wouldn’t be able to otherwise.
Example: Applying Independence
Alice and Bob can solve 75% and 70% of the problems in a book, respectively. Assuming every event is independent, if a problem is selected at random from the book, whatis the probability it will be solved?
Let be the event that Alice solves the problem, and be the event that Bob solves the problem.
We want one of them to solve the problem - in other words, . Applying our set identity, we find
Bayes’ Formula
Let be events that are a partition of sample space . We define a partition as
In other words, no two events intersect, and the combination of all ‘s forms our sample space .
Now say we have an event which has a subset of . Then, because all of our ‘s form a disjoint union of ,
Because our ‘s disjointly form , we can conceptually think of this as “slicing” into multiple ‘s. Thus, we can find by totaling all places where intersects a .
graph LR E[Experiment]; B1[B1]; B2[B2]; B3[B3]; B4[B4]; A1[A]; A2[A]; A3[A]; A4[A]; E -.-> B1 & B2 & B3 & B4; B1 -.-> A1; B2 -.-> A2; B3 -.-> A3; B4 -.-> A4;
Applying our definition for conditional probability, we find
This formula derives the base of Bayes’ formula.
Theorem: Bayes' Formula
Let be a partition of . Then,
In other words, given we know for all , we can find .
We see some applications of Bayes’ Formula below.
Example: Bayes' Formula (1)
- If Alice plays, there is a 75% chance the team wins.
- If Bob plays, there is a 40% chance the team wins.
- The team doctor says there’s a 70% chance Alice can play.
- Only Alice or Bob can play at a given time.
Given that the team won, what’s the chance that Bob played?
Let denote the event that Alice plays, denote the event that Bob plays, and denote the event that the team wins. We know the following
We want to find .
Example: Bayes' Formula (2)
A multiple choice question has choices. Alice knows the answer with probability . If she does not know, she instead guesses with probabiliy . What is the probability that Alice knew the answer, given she answered correctly?
Let denote the event Alice knew the answer, and denote the event she answered correctly. Then,
We want to find .
Note that as gets large, this probability actually increases! This makes sense because with more choices, she’s more likely to have known the answer if she got it correct.
Example: Bayes' Formula (3)
A rare disease affects 1% of a population. There is a test to check for this disease.
- If you have the disease, the probability you test negative is 1% (false negative).
- If you don’t have the disease, the probability you test positive is 2% (false positive).
What is the probability you have the disease, given you test positive?
Let denote the event that you have a disease, and denote the event you test positive. Then,
We want to find .
This may be a surprising result! One way to think about this intuitively is that the rareness of the disease holds more meaning than the accuracy of the test.
Example: Bayes' Formula (4)
In tennis, “deuce” is a score of 40-40. To win the game, 1 person more score 2 points in a row, and if both players score 1, it resets to deuce.
Alice has 60% to win a point. What is the probability that Alice wins?
Let be the event where Alice wins the next two points, be the event where Alice loses the next two points, and be the event where Alice only wins one point.
Thus, the probability Alice wins the game (let’s call ) is equal to
Note that we know that , because if Alice only wins one point, we return back to a deuce.