Chapter 4 : Bayes rule

Total Probability, Bayes rule, Tree diagrams

Probability spaces: Sample space S, Probability measure P

FI 1 P4

Σ p(si) = 1        si<1   Event E is a subset of S,  so:  p(E) = Σ (ps)             S<E

Definition:  events A  and  B are  independent so  P(A ∩ B)=P(A) P(B), We  can extend  this to more than 2 subsets: A,B,C S , A,B,C=events, =are mutually independent that means A and B are independents, A and C are independents and B and C are independents:

P(A∩B)=P(A) P(B)      P(A∩C)=P(A) P(C)          P(B∩C)=P(B) P(C)              P(A∩B∩C)=P(A) P(B) P(C)

For more than 3 sets ,We can generalize this : p {A1∩A2∩A3∩A4∩A5∩…….}=  P(A1) P(A2) P(A3)P(A4)p(A5) ………

Conditional probability :

PROBABILITY CONDITIONNELLE 1

P(A\B) =  p(A∩B)/p(B),      Note: if A and B are independent then P(A\B) =P(A) because  P(A)p(B)/p(B)= p(A)

Total Probability rule

TOTAL PROBABILITY RULE

Suppose {A1,A2,A3,A4,…….An ) is a partition of S, that means these are subsets which together they form all of S (without overlap).Suppose B is an event in S. Then the probability of B equals the sum:P(B) =Σ p(B\Ai) p(Ai)

Proof: B=(B∩A1 )U (B∩A2 )…….. U(B∩An) .This is a disjoint union so:

P(B)=P(B∩A1 )+P(B∩A2 )+………..+P(B∩An )= P  P(B\A1 )PA1 +P(B\A2)PA2 …………P(B\An)  P An

Ex: does it rain more on week-ends? After a year of observation, we find that the probability of rain on a work day (W) is represented by 0,2.

Let’s also suppose that the probability of rain on a week-end day (H) is 0,3. With this we can probably say that it is more likely to rain on a day of weekend than the ordinary day.

Question: What is the overall probability of rain on a random day?

This question is usefull to introduce the tree diagram

What is the probability of rain? Total Probability:P(R)=P(R\W)  P(W)+P(R\H) P(H)  =0,2 X5/7 +0,3X2/7 =0,2286

Bayes Rule

Recall that P(A/B)  is not symmetric so  P(A/B) ≠ P(B/A)  ,  Bayes rule:

If 〈 A1,A2,A3,A4,A5……An〉 is a partition of S and B ≤ S (an event), then for any j,  the P(Aj/B)= P(B/Aj) P(Aj)

Proof:        P(Aj/B)=  P(Aj∩B)/p(B)

                   p(B/Aj)=  P(Aj∩B)/p(Aj)

                  So :   P( Aj/B) = P(B/Aj)p(Aj)/p(B)

                  and in general : P(Aj/B) = P(B/Aj)P(Aj)/ ∑P(B/Ai)P(Ai)

Let’s look to the situation of raining day. Suppose on a certain day it rains and we are intersected to know, what’s the probability that happens to be a week-end day ? Well according to the Bayes Rule

P (H/R)= P(R/H)P(H)/P(R)  = p(R/H)p(H)/p(R/W)p(W)+p(R/H)p(H)

= 0,3×2/7 divided by :0,2×5/7+0,3×2/7

Medical ex:

If you take a medical test is + but tests are not infaillable.A random person has a disease (D) or not ( ),Let’s suppose that we know that 3% of the population has this disease.The test is differing on actually if you have the disease. The test for D is 99%  sure of returning (+) if the persons has the disease and 98% sure of correctly returning (-) if they do not have it.Given Y what is the probability of D?

P