A Noob’s perspective — Learning Data Science, ML and AI from scratch. Pt 5
More on Probability Theorems
Theorem: P(Ā) = 1 — P(A) or the probability of the complement of A is 1 minus the probability of the event A.
Proof:
- 1 = P(S) axiom 2 — The probability of something happening is always 1
- = P(A U Ā)
- = P(A) + P(Ā) => P(Ā) = 1 — P(A)
In a similar manner P(Ø) = 0 or the probability of the null set is zero. This means that we can never have nothing happening.
Proof:
The complement of S or S is equal to the null set. using the first theorem P(Ø) = 1 — P(S). Since the probability of the whole set is always 1 then this equation yields zero.
this is where it starts to get weird
Note: the converse is false: P(A) = 0 does not mean necessarily that A is the null set.
Understand that it is possible that we have events with 0 probability which is not the same as axiom 2 which is the probability of something happening is 1.
Example:
Pick a number between 0 and 1. I don’t know the proof yet but the probability of any outcome is zero. I believe that this is because of the infinite possibilities. 1/infinity = 0.
Theorem: For any two event A and B, they don’t have to be disjoint in this case: P(A U B) = P(A) + P(B) — P(A ∩ B)
Proof:
We know that the union is either A or B minus the intersection, so we add the probabilities of A and B and subtract the probability of the intersection.
Example:
- 40% chance of colder weather
- 10% chance of rain and colder weather
- 80% chance of rain or colder weather
Chance of rain =>
P(R) = P(R U C) — P(C) + P(R ∩ C)
= 0.80–0.4 + 0.1
= 0.5
Theorem: For any three events A, B, C
P(A U B U C) = P(A) + P(B) + P(C) — P(A ∩ B) — P(A ∩ C) — P(B ∩ C) + P(A ∩ B ∩ C)
Example:
Imagine 65% of Asguardians like ice cream (I) , 45% enjoy music (M), 20% like to party (P). Also 15% like ice cream and enjoy music, 15% I and P, and 10% M and P, and 5% do all three.
P(I U M U P) = P(I) + P(M) + P(P) — P(I ∩ M) — P( I ∩ P) — P( M ∩ P) + P(I ∩ M ∩ P)
= 0.65 + 0.45 + 0.20–0.15–0.15–0.1 + .05
= .95
Now let’s find out what is the probability of someone doing only one activity.
- 5% like to do everything
- 15% like Ice cream and music
- 15% like Ice cream and Partying
- 10% like Music and Partying
- 20% like to party
- 45% like Music
- 65% like Ice Cream
Theorem : general principle of Inclusion-exclusion
which is a formula in which you include all the single events, exclude the double events, and include the triple events.