Probability Basics
Probability =
Examples:
-
In a deck of cards (4 suites),
- Probability of drawing diamond = =
- Probability of drawing a Jack = =
-
In a 6 sided dice,
- Probability of getting number six =
- Probability of getting even number = =
Events
Now that we know the equation for Probability, the # of favorable outcomes is also called an Event and # of total possible outcomes is called Sample Space.
Example 1
- Sample S = Deck of cards (52)
- Event A = Drawing a diamond from deck of cards
- Event Ā = Complement of A = Drawing a non-diamond card from the deck
- P(A) = = , P(Ā) = =
- Also, P(A) = 1 - P(Ā)
Example 2
- Event B = Drawing a Jack from deck of cards
- Event (B) = Drawing a non-Jack card
- P(B) = = , P(B) = =
Intersection & Union
Take the same sample space S = Deck of cards (52)
- Event A: Draw a Diamond
- Event B: Draw a Jack
- Event C: Draw a Heart
Example 1: Intersection A, B
Now, intersection of Event A & Event B (or A and B) refers to Drawing a Diamond Jack card. There is only 1 card satisfying this condition.
- A ∩ B => intersection of A and B => A and B
- P(A ∩ B) =
Example 2: Union A, B
Union of Event A & Event B (A or B) refers to Drawing a Diamond card or a Jack card. There are 13 Diamond cards and 4 Jack cards.
- A ∪ B => Union of A and B => A or B
- P(A ∪ B) =
Looking at graphically,
- P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
Example 3: Intersection A, C
Intersection of Event A & Event C refers to Drawing a card which is both Diamond and Heart. There are no cards with such condition.
- A ∩ C = Ø
- Event A and Event C are Mutually exclusive
Conditional Probability
Independent Events
Two Events (say A and B) are said to to independent of each other, if probability that one event occurs doesn't affect the probability of the other event.
Example
Event A: Roll 2 on die first time, Event B: Roll 6 on die second time
- Here A and B are independent of each other, i.e. Event B is no way affected by the outcome of Event A.
- P(A ∩ B) = P(A) * P(B) = =
For independent events,
Dependent Events
Two Events (say A and B) are dependent if the occurrence of the first event affects the occurrence of the second event.
Example
Event A: Draw Diamond Ace from the deck, Event B: Draw Spades Ace from the remaining deck.
- Here, after the completion of Event A, you're left with one less card in the deck.
- Therefore, P(B|A) = =
For dependent events,
Bayes' Theorem
Example:
When India wins a cricket match, Mr. Harsha predicts the win correctly 70% of the time. When India loses the match, Harsha will predict win 35% of the time.
Given that, India wins cricket match 60% of the time, what are the chances of India winning whenever Harsha predicts that India wins?
This is clearly a conditional probability problem.
Event W: India wins the match
Event L: India loses the match
Event Y: Harsha predicts India wins the match
Event N: Harsha predicts India loses the match
What's been asked? The probability that India wins (W), given Harsha predicts the win (Y)
i.e. we need to calculate P(W | Y)
What do we know so far,
- P(W) = 60% (India wins 60% of the time)
- P(Y | W) = 70% (Harsha predicts 70% given India wins)
Now,
Equating them gives,
Hence,
Now we can calculate P(W|Y) as,
How to calculate ? i.e. Probability of Harsha predicting India's win. Harsha predicts India's win in two scenarios - when India actually wins and when India loses. Therefore,
Therefore,
Bottom-line is, if Harsha says India wins, there's 75% chance that India actually wins