Union & Intersection of Events&Conditional Probability
Union & Intersection of Events&Conditional Probability
We can define an event (C) of getting a 4 or 6 when we roll a fair die. Here event C is a union of
two events:
Event A = Getting a 4
Event B = Getting a 6
P (C) = P (A ꓴ B)
Consider the probability of (A ꓴ B) when we are interested in combined probability of two (or
more) events.
Intersection of Events
Let C be the event of getting a multiple of 2 and 3 when you throw a fair die.
Event A = Getting a multiple of 2 when you throw a fair die
Event B = Getting a multiple of 3 when you throw a fair die
Event C = Getting a multiple of 2 and 3
Event C is an intersection of event A & B.
Probabilities are then defined as follows.
P (C) = P (A ꓵ B)
Disjoint Events
The shaded region is the probability of both events A and B occurring together.
Disjoint Events
What if, you come across a case when any two particular events cannot occur at the same time.
For example: Let’s say you have a fair die and you have only one throw.
Independent Events
If the occurrence of event A doesn’t affect the occurrence of event B, these events are called
independent events.
some examples of independent events.
Getting heads after tossing a coin AND getting a 5 on a throw of a fair die.
Choosing a marble from a jar AND getting heads after tossing a coin.
Probability of independent events
In this case the probability of P (A ꓵ B) = P (A) * P (B)
Let’s take an example here. Suppose we win the game if we pick a red marble from a jar
containing 4 red and 3 black marbles and we get heads on the toss of a coin. What is the
probability of winning?
We need to find the probability of both getting a red marble and a heads in a coin toss.
P (A) = 4/7
P (B) = 1/2
We know that there is no affect of the color of the marble on the outcome of the coin toss.
P (A ꓵ B) = P (A) * P (B)
In the above example, let’s define event A as getting a Red marble from the jar. We then keep
the marble out and then take another marble from the jar.
Will the probabilities in the second case still be the same as that in the first case?
Let’s see. So, for the first time there are 4/7 chances of getting a red marble. Let’s assume you
got a red marble on the first attempt. Now, for second chance, to get a red marble we have 3/6
chances.
If we didn’t get a red marble on the first attempt but a white marble instead. Then, there were
4/6 chances to get the red marble second time. Therefore the probability in the second case
was dependent on what happened the first time.
Conditional Probability
Conditional probabilities arise naturally in the investigation of experiments where an outcome
of a trial may affect the outcomes of the subsequent trials.
We try to calculate the probability of the second event (event B) given that the first event
(event A) has already happened. If the probability of the event changes when we take the first
event into consideration, we can safely say that the probability of event B is dependent of the
occurrence of event A.
Drawing a second ace from a deck given we got the first ace
Finding the probability of having a disease given you were tested positive
Finding the probability of liking Harry Potter given we know the person likes fiction
Suppose you draw two cards from a deck and you win if you get a jack followed by an ace
(without replacement). What is the probability of winning, given we know that you got a jack in
the first turn?
We need to find
P(A) = 4/52
Suppose you have a jar containing 6 marbles – 3 black and 3 white. What is the probability of
getting a black given the first one was black too.
P (A) = 3/6
P (B) = 2/5
P (A and B) = ½*2/5 = 1/5
Bayes Theorem
The Bayes theorem describes the probability of an event based on the prior
knowledge of the conditions that might be related to the event. If we know the
conditional probability , we can use the bayes rule to find out the reverse
probabilities.
Rahul’s favorite breakfast is bagels and his favorite lunch is pizza. The
probability of Rahul having bagels for breakfast is 0.6. The probability of him
having pizza for lunch is 0.5. The probability of him, having a bagel for
breakfast given that he eats a pizza for lunch is 0.7.
Let’s define event A as Rahul having a bagel for breakfast, Event B as Rahul
having a pizza for lunch.
P (A) = 0.6
P (B) = 0.5
Now what if we need to know the probability of having a pizza given you had a bagel for
breakfast. i.e. we need to know
For the previous example – if we now wish to calculate the probability of having a pizza for
lunch provided you had a bagel for breakfast would be = 0.7 * 0.5/0.6 = 0.583