Docsity

Conditional Probability - Essay - Mathematics, Essays (high school) of Mathematics

Toggle sidebar
bg1
Notes for Chapter 2 of DeGroot and Schervish
Conditional Probabilities
Sometimes if we are given additional information we can reduce our sample space.
If we know an event F occurs, then the probability of another event E occurring may
change.
Ex. It snows tomorrow, given it is snowing today.
If event F occurs what is the probability that event E occurs?
This probability is called the conditional probability of E given F, written P(E|F).
E|F symbolizes the event E given the event F.
Ex. Flip two coins.
S = {HH,HT,TH,TT}
P(HH) = ¼
F = at least one H
If we know F occurs, then our new sample space is S’ = {HH, HT, TH}
P(HH|F) = 1/3
The probability of getting two H is greater if we already know F.
G = the first flip is H
S’’ = {HH, HT}
P(HH|G) = ½
And greater yet if we already know G.
Definition: If P(F)>0, then P(E|F) = P(EF)/P(F)
(Draw Venn diagram.)
What if A and B are disjoint?
If A and B are disjoint then P(AB) = 0. Hence, P(A|B) = 0. If B occurs, then A cannot
occur.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Conditional Probability - Essay - Mathematics and more Essays (high school) Mathematics in PDF only on Docsity!

Notes for Chapter 2 of DeGroot and Schervish Conditional Probabilities Sometimes if we are given additional information we can reduce our sample space. If we know an event F occurs, then the probability of another event E occurring may change. Ex. It snows tomorrow, given it is snowing today. If event F occurs what is the probability that event E occurs? This probability is called the conditional probability of E given F, written P(E|F). E|F symbolizes the event E given the event F. Ex. Flip two coins. S = {HH,HT,TH,TT} P(HH) = ¼ F = at least one H If we know F occurs, then our new sample space is S’ = {HH, HT, TH} P(HH|F) = 1/ The probability of getting two H is greater if we already know F. G = the first flip is H S’’ = {HH, HT} P(HH|G) = ½ And greater yet if we already know G. Definition: If P(F)>0, then P(E|F) = P(EF)/P(F) (Draw Venn diagram.) What if A and B are disjoint? If A and B are disjoint then P(AB) = 0. Hence, P(A|B) = 0. If B occurs, then A cannot occur.

Ex. is 3 or less? What is the probability of rolling an even number with a single die, given the die roll S = {1,2,3,4,5,6} A = roll an even number ={2,4,6} B = roll a 3 or less = {1,2,3} AB = {2} P(A|B) = P(AB)/P(B) = P({2})/P({1,2,3}) = 1/ What is the probability the die roll is 3 or less, given the die roll is an even number? P(B|A) = P(AB)/P(A) = P({2})/P({2,4,6}) = 1/

Ex. least one is a boy? A family has two children. What is the probability that both are boys, given that at Let S= {(b, b), (b, g), (g, b), (g, g)}. (b, g) denote the event that the older child is a boy and the younger child a girl. Assume that all outcomes are equally likely. E = both children are boys F = at least one of them is a boy

434 31

P ( E F )= PP ((^ EF F )^ )= P ({( b , Pb ),({(( bb ,, g^ b ),^ )})( g , b )})= =

What is the probability that both are boys given that the younger is a boy? E = both children are boys G = the younger is a boy. P(E|G) = P(EG)/P(G) = P({b,b})/P({g,b},{b,b}) = 1/

Multiplication Rule: P(E1E2.......En) = P(E1)P(E2|E1)P(E3|E1E2)........P(En|E1E2...En-1) Proof: P(E1)P(E2|E1)P(E3|E1E2)........P(En|E1E2...En = P(E1)(P(E1E2)/P(E1))(P(E1E2E3)/P(E1E2))....... P(E1E2.......En)/P(E1E2.......En-1) -1) = P(E1E2.......En) Ex. replacement. What is the probability of drawing four red balls? A box contains five red balls and five green balls. Four balls are sampled without E1 = first ball is red E2 = second ball is red E3 = third ball is red E4 = fourth ball is red P(E1E2E3E4) = P(E1)P(E2|E1)P(E3|E1E2)P(E4|E1E2E3) P(E1) = 5/10 = 1/2 P(E2|E1) = 4/ P(E3|E1E2) = 3/8 P(E4|E1E2E3) = 2/ P(E1E2E3E4) = 1/24/93/8*2/7 = 24/1008 = 1/ Another way to solve this problem: (using the methods learned in the previous class) (5 4)/(10 4) = 5/210 = 1/

Ex. hat into the center of the room. The hats are first mixed up and then each man randomly Matching problem (revisited) - Suppose that each of three men at a party throws his selects a hat. What is the probability that none of the three men selects his own hat? Let us denote by Ei, i=1, 2, 3, the event that the ith man selects his own hat. We shall solve the above by first calculating the complementary probability that at least one man selects his own hat. P(no man selects his hat) = 1 P(E1∪E2∪E3) - P(at least one man selects his own hat) = 1 - To calculate the probability P(E1∪E2∪E3), we need Proposition 4: P(E1∪E2∪E3) = P(E1) + P(E2) + P(E3) - P(E1E2) - P(E1E3) - P(E2E3) + P(E1FE3) P(Ei) = 1/3 for i=1,2, P(EiEj) = P(Ei)P(Ej|Ei) P(Ei) = 1/3 and P(Ej|Ei) = 1/2 i ne j P(EiEj) = 1/3*1/2 = 1/ P(E1E2E3) = P(E1)P(E2|E1)P(E3|E1E2) P(E1)P(E2|E1)=P(E1E2) = 1/ P(E3|E1E2) = 1 Now we get, P(E1∪E2∪E3) = 1/3 + 1/3 + 1/3 - 1/6 - 1/6 - 1/6 + 1/6 = 2/ Hence, the probability that none of the men selects his own hat is 1-2/3=1/3.

It is very important to note that conditional probabilities are probabilities in their own right. By this we mean that conditional probability satisfy all the properties of ordinary probabilities. (1) 0<= P(E|F) <=1 (2) P(S|F) = 1 (3) If Ei, i=1,2,....are mutually exclusive events, then P(U Ei|F) = sum P(Ei|F) Easy to show. Still a probability, but the sample space has been redefined. All the Propositions we derived for regular probabilities also hold for conditional probabilities. Ex. P(Ac|B) = 1- P(A|B)

Bayes' Formula Let E and F be events. We can express E as E = EF U EFC Therefore by Axiom 1: P(E) = P(EF) + P(EFC) But P(EF) = P(E|F)P(F) and P(EFC) = P(E|FC)P(FC) So, P(E) = P(E|F)P(F) + P(E|FC)P(FC) Another way of writing this is P(E) = P(E|F)P(F) + P(E|FC)(1-P(F)) This formula enables us to calculate the probability of an event by conditioning upon whether or not a second event occurs. Very useful!

Ex. and four blue balls. A ball is drawn at random from Box 1 and put into Box 2, and then a Box 1 contains two white balls and three blue balls, while Box 2 contains three white ball is picked at random from Box 2 and examined. What is the probability it is blue? A = ball chosen from Box 1 is blue. B = ball chosen from Box 2 is blue. P(B) = P(B|A)P(A) + P(B|AC)P(AC) P(B|A) = 5/8 P(A) = 3/ P(B|AC) = 4/8 P(AC) = 2/ P(B) = 5/83/5 + 4/82/5 = 23/

An important equation to note is that, P(E|F) = P(EF)/P(F) = P(F|E)P(E)/P(F) Bayes' Formula - will discuss a more general version soon.

Ex. In answering a multiple choice question the student either knows the answer or guesses. Let p be the probability the student knows the answer and (1-p) the probability he guesses. Assume that a student who guesses gets the question correct with probability 1/m, where m are the number of choices. What is the probability that the student knew the answer to the question, given that he gets the correct answer? A = student knows answer B = student gets answer correct P(A|B) = P(B|A)P(A)/P(B) P(B|A) = 1 P(A) = p P(B) = P(B|A)P(A) + P(B|AC)P(AC) = 1p + 1/m(1-p) = p +(1-p)/m P(A|B) = p/(p +(1-p)/m) = mp/(1-p+mp) m = 4 and p=1/ P(A|B) = 2/(1-1/2+2) = 2/(5/2) = 4/

We have so far seen that, P(E) = P(E|F)P(F) + P(E|FC)P(FC). In general if F1,F2,.......Fn are mutually exclusive events such that U Fi = S then P(E) = sum P(EFi) = sum P(E|Fi)P(Fi). Law of total probability. We have also seen in the previous few examples that P(E|F) = P(EF)/P(F) = P(F|E)P(E)/P(F). A general version of this equation is given by Bayes' Formula. Bayes' Formula: U Fi then P(Fi|E) = P(E|Fi)P(Fi)/(sum P(E|Fj)P(Fj)). Suppose that F1, F2, .... Fn are mutually exclusive events such that S =

Ex. There are three machines (A, B and C) at a factory that are used to make a certain product. Machine A makes 25% of the products, B 35% and C 40%. Of the products that A makes, 5% are defect from the different machines are mixed up and sent to the customer.ive, while for B 4% are defective and for C 2%. The products (a) What is the probability that a customer recieves a defective product? (b) What is the probability that a randomly chosen product was made by A, given the fact that it is defective? E = product defective F1 = product comes from A F2 = product comes from B F3 = product comes from C (a) P(E) = P(E|F1)P(F1) + P(E|F2)P(F2) + P(E|F3)P(F3) = 0.050.25 + 0.040.35 + 0.020.40 = 0. (b) P(F1|E) = 0.250.5/0.0345 = 0.

Assume that Fi, i=1,....n are competing hypothesis, then Bayes formula gives us a way to compute the conditional probabilities of these hypotheses when additional evidence E becomes available. If E has occurred, what is the probability that Fi occurred as well. Bayes' Formula gives us a way to update our personal probability. In the context of Bayes' Formula, posterior distribution of F i. P (F i ) is the prior probability of F i and P (F i | E) is the

Ex. A plane is missing and it is asumed that it has crashed in any of three possible regions with equal probability. Assume that the probability of finding the plane in Region 1, if in fact the plane is located in there, is 0.8. What is the probability the plane is in the ith region given that the search of Region 1 is unsuccessful? R1 = plane is in region 1 R2 = plane is in region 2 R3 = plane is in region 3 E = search of region 1 unsuccessful. P(R1|E) = P(E|R1)P(R1)/(sum P(E|Ri)P(Ri)) P(Ri) = 1/3 P(E|R1) = 0.2 = 1/ P(E|R2) = 1 P(E|R3) = 1 P(R1|E) = (1/51/3)/(1/51/3 + 1/3 + 1/3) = (1/15)/(11/15) = 1/ P(R2|E) = (11/3)/(1/51/3 + 1/3 + 1/3) = (1/3)/(11/15) P(R3|E) = (11/3)/(1/51/3 + 1/3 + 1/3) = (1/3)/(11/15) = 5/11 = 5/ Original hypothesis: P(R1) = P(R2) = P(R3) New hypothesis: P(R1) < P(R2) = P(R3)

Odds ratio The odds ratio of an event A is given by, P(A)/P(AC) = P(A)/(1 The odds ratio of an event A tells us how much more likely it is that an event A occurs-P(A)) than it is that it doesn't occur. If the odds ratio is equal to alpha, then one says that the odds are alpha to 1 in favor of the hypothesis. Ex. A box contains 3 red and 1 blue ball. The probability of drawing a red ball is 3/4. The odds of picking a red ball is 3 to 1. A hypothesis H is true with probability P(H). The odds ratio is P(H)/P(Hc). New evidence E is introduced. P(H|E) = P(E|H)P(H)/P(E) and P(Hc|E) = P(E|Hc)P(Hc)/P(E) Odds ratio after introduction of new evidence E is, P(H|E)/P(Hc|E) = (P(E|H)P(H)/P(E))(P(E|Hc)P(Hc)/P(E)) = (P(H)/P(Hc))(P(E|H)/P(E|Hc). Odds ratio increases if P(E|H) > P(E|Hc).

Theorem: If E and F are independent, so are (a) E and Fc. (b) Ec and F. (c) Ec and Fc. Proof of (a): Assume E and F are independent, P(EF) = P(E)P(F) E = EF U EFc EF and EFc are mutually exclusive, so P(E) = P(EF) + P(EFc) or P(EFc) = P(E) - P(EF) = P(E) - P(E)P(F) = P(E)(1-P(F)) = P(E)P(Fc) Hence the result is proved. Show (b) and (c) at home.

D P(EFG) = P(E)P(F)P(G)efinition: The three events E, F and G are said to be independent if P(EF) = P(E)P(F) P(EG) = P(E)P(G) P(FG) = P(F)P(G)

Ex. A = first die is a 4 Roll two dice. Let, B = second die is a 3 C = sum of two dice is 7 = {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)} P(A)= 1/6 P(B) = 1/ P(C) = 1/ P(A)P(B) = 1/61/6 = 1/36 P(AB) = P({4,3}) = 1/ P(AB) = P(A)P(B) Using similar arguments, we can see that P(AC) = P(A)P(C) and P(BC) = P(B)P(C). for yourself) (Verify P(ABC) = P({4,3}) = 1/36 NOT independent.. But P(A)P(B)P(C) = 1/61/6*1/6 = 1/256. So A, B, C are

Definition: 2<=r<=n, of these events P(Ei1, Ei2, ..... Eir) = P(Ei1)P(Ei2) .....P(Eir). The events E1, E2, .... En are independent if, for every subset Ei1, Ei2, ..... Eir,

Independent Trials Sometimes an experiment consists of performing a sequence of subexperiments. If each subexperiment is identical, then the subexperiments are called trials. If the trials are independent they are called independent trials.

Ex. Roll a dice five times What is the probability of rolling a five exactly 2 times? E = rolling a five Ec = not rolling a five P(E) = 1/6 P(Ec) = 5/ P({(Ec)EE(Ec)(Ec)}) = 5/61/61/65/65/6 = (1/6)^2(5/6)^ (5 choose 2) different ways to get exactly 2 fives in five rolls P(Rolling exactly 2 fives in 5 tries) = (5 choose 2)(1/6)^2(5/6)^ What is the probability of at least one five? P(1 six in 5 tries) = (5 choose 1) (1/6)^1(5/6)^4 P(2 sixes in 5 tries) = (5 choose 2) (1/6)^2(5/6)^ Etc…. Use complements: 1 - P(0 sixes in 5 tries) = 1-(5 choose 0)(1/6)^0(5/6)^5 = 1-(5/6)^5 = In general if we have a series of trials where in each trial the event E consists of a success and the event Ec consists of a failure, where P(E)=p and P(Ec)=(1-p), then the probability of exactly k successes in the n trials is: P(exactly k successes in n trials) = (n k) p^k (1-p)^(n-k). (Binomial probability.)

Ex. probability that an outcome of 5 appears before an outcome of 7 when t Independent trials, consisting of rolling a pair of fair dice, are performed. What is thehe outcome of a roll is the sum of the dice. Let N = neither 5 or 7 5, N5, NN5, NNN5, ........ Let, En= no 5 or 7 appears on the first n-1 trials and a 5 appears on the nth trial. The desired probability is, P(UEn) = sum_{n=1}^{/inf} P(En). P(5) = P({( P(7) = P({(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)}) = 6/361,4), (2,3), (3,2), (4,1)}) = 4/ P(neither 5 or 7) = 1-(4/36+6/36) = 26/36 = 13/ P(En) = (3/18)^(n-1)4/ P(UEn) = sum_{n=1}^{/inf} (3/18)^(n = 1/9 sum_{j=0}^{/inf} (13/18)^(j)-1)4/ = 1/9(1/(1 = 1/91/(5/18) = 2/5-13/18)) We used the formula for the geometric series: sum_{k=0}^ n t^k = (1-t^(n+1))/(1-t) for t ne 1 sum_{k=0}^ inf t^k = 1/(1-t) for |t|< To remember this, just recall the trick: Sum_{k=0}^n t^k – t Sum_{k=0}^n t^k = 1 – t^{n+1}, because the sum telescopes. Let, Fn= no 5 or 7 appears on the first n Verify that P(UFn) = 3/5. -1 trials and a 7 appears on the nth trial.

Ex probability 2/3. Player B wins a match with probability 1/3. The player who first wins three. A game consists of 5 matches and two players, A and B. Player A wins a match with matches wins the game. Assume the matches are independent. What is the probability that A wins the game? Two ways to compute the probability: I his third match). Player A wins 3 matches and player B wins 2 matches or less. (Game ends when A wins A wins three and B two OR A wins three and B one OR A wins three and B zero Note A always wins the last game. P(A wins) = (4 2)(2/3)^3(1/3)^2 + (3 2)( (4 2) = four slots for two A’s: AABBA, ABABA, ABBAA, BBAAA, BABAA, etc2/3)^3(1/3) + (2 2)(2/3)^3 = 64/ (3 2) = AABA, ABAA, BAAA (2 2) = AAA

Or: II. Player A wins 3 matches or more out of the 5 matches. (A wins at least 3 matches) A wins three and B two OR A wins four and B one OR A wins five and B zero P(A wins) = (5 3)(2/3)^3(1/3)^2 + (5 4)(2/3)^4(1/3) + (5 5)(2/3)^5 = 64/ Both ways are equivalent.