Probability in Data Science Flashcards
Probability Space
Consists of sample space, event space and probability
Sample Space
Represented by the Greek letter omega, it represents all possible outcomes.
Event Space
This represents every possible combination of elementary events.
Three Axioms
1) P(A) always has to be positive.
Mutually Exclusive
If the events can’t happen simultaneously.
P(A u B)
If mutually exclusive/independent, P(A) + P(B) - P(A n B).
P(A n B)
If independent, P(A) * P(B)
If dependent, P(A|B)/P(B) or P(B|A)/P(A)
Mutual independence vs pairwise independence
If something is mutually independent it is also pairwise independent.
Pairwise independent tests the probability of pairs to see if they are independent with P(A n B) = P(A)P(B), whilst mutually independency tests all values to check that everything is independent together.
How to partition sample space
Lets say we have an event A with a sample space B, and that A ⊆ B. If we were to divide B into multiple partitions, lets say {B_1, B_2, … , B_5}, we can use these to figure out the probability of A. This is done by:
P(A) =
Σ_n P(A and B_n) =
ΣP(A|B_n)P(B_n).
Bayes Theorem
P(A | B) = P(B | A) x P(A) / P(B)
We could rewrite P(B) as:
P(B | A) x P(A) + P(B | ¬A) x P(¬A)
Bayesian Network
A probabilistic graphical model that represents a set of variables and their conditional dependencies via a Directed Acyclic Graph.
Base Rate Fallacy
P(A | B) != P(B | A)