## Probability of a Union of Events

- We also know that for a set of disjoin events A(i)
- For every two events

`P(A U B) = P(A) + P (B) - P(A ∩ B)`

- This can be extended to 3 or More events

`P(A U B U C) = P(A) + P(B) + P(C) - {P (A ∩ B) + P(B ∩ C) + P(A ∩ C)} + P(A ∩ B ∩ C)`

- Example: Consider 200 students
- 50 students take programming (P)
- 100 Students take electronics (E)
- 75 Students take Maths (M)
- 30 students take programming+Electronics
- 45 students take electronics+maths
- 25 students take electornics+programming
- 15 students take all the three classes
- Some students take no classes from the list
- What is the probability that a student takes atleast one class

## Conditional Probability

- Lets assume you play outdoor sports, you care about rain
- Compare
- Probability it will rain today (Unconditional Probability)
- Probability it will rain today give its been raining for last two days (Conditional Probability)
- The conditional probability of event A given event B has occured is
- Example-1:
- The unconditional probability that you will roll 3 on a balanced die roll => 1/6
- But what if you observed an odd number
- This reduces number of options => {1,3,5} => conditional probability => 1/3
- Lets use the formula
- Scenario: We have gone to food plaza. Our friend
`Arundhati`

has placed a bet of 100 rs saying next person we meet will love both biryani and pizza - We have collected some data and represented in colorful venn diagram
- So if we represent in contingency table, They contain the same information
- unconditional probabilities:
- Row total & Column Total
- What is probability of not loving biryani given he loves pizza => 5/7