1.4 Conditional probability and Independent event

Dependant Events are events that we can know the next if we know the first one.  Conditional Probability P(A|B): Probability of occurring one event(B) given that the other event(A) occur. (in the dependant events!)

We can think about the example of the events about working out tomorrow at 3pm.

Let's say that the probability of doing outdoor sports or indoor sports is above when it is sunny or rainy.
The conditional probability for each event: P(O|S) = 90%, P(I|S) = 10%, P(O|R) = 20%, P(I|R) = 80%.

Then what is the P(S and O)? Here, "and" means "joint probability".
For this, the weather should be sunny and also do outdoor sports.
Above the diagram, we intuitively are supposed to multiply 70% and 90%.
So, P(S∩O) = P(S)*P(O|S) =70%*90%= 63%.

Using joint probability, we can calculate the marginal probability. Marginal probability is the probability of an event irrespective of the outcome of another variable (e.g. P(A)).
To calculate the marginal probability of event O(outdoor sports), we are gonna get P(R ∩O) because of P(O) = P(S∩O) + P(R∩O) (disjoint!).
P(R ∩O) = P(R)*P(O|R) =30%*20%= 6%.
P(O) = P(S∩O) + P(R∩O) = 63%+6% = 69%.
P(I) = 1-P(O) = 1-0.69 = 0.31 = 31%


When P(A) and P(B) is dependant, P(A∩B) = P(A|B)*P(B) = P(B|A)*P(A) 

If A and B are independent, there is no P(A|B) = P(A).
When P(A) and P(B) is independant, P(A∩B) = P(A)*P(B)

Let's give an example of an independent event. Let's say that X is the number of heads when we flip the coin twice. P(H) = 0.6. P(T) = 0.4.
X can be 0,1,2. and P(X=0) + P(X=1) +P(X=2) should be 1.
P(X=0) + P(X=1) + P(X=2) = 1
P(X=0) = P(T and T) = P(T) * P(T)  <- independant = .4*.4 = .16
P(X=1)=P(H and T) = P(H) * P(T)  + P(T) * P(H) = 0.6*0.4 +0.4*0.6= 0.48
P(X=2) =P(H and H) = P(H) * P(H) = 0.6*0.6 = 0.36