Transcription of 3. Conditional probability & independence Conditional ...
1 3. Conditional probability & independenceConditional probabilities Question: How should we modifyP(E)if welearn that eventFhas occurred? Derivation: Suppose we repeat the experimentntimes. Letn(E F)be the number of timesthat bothEandFoccur, andn(F)the numberof timesFoccurs. The proportion of timesEoccurs only countingtrials whereFoccurs isn(E F)n(F)=n(E F)/nn(F)/n P(E F)P(F). Definition: the Conditional probability ofEgivenFisP(E|F) =P(E F)P(F), forP(F)>01 Example 1. 27 students out of a class of 43 areengineers. 20 of the students are female, of whom7 are engineers. Find the probability that arandomly selected student is an engineer giventhat she is 2. Deal a 5 card poker hand, and letE={at least 2 aces},F={at least 1 ace},G={hand contains ace of spades}.(a) FindP(E)(b) FindP(E|F)(c) FindP(E|G)3 The Multiplication Rule Re-arranging the Conditional probabilityformula givesP(E F) =P(F)P(E|F)This is often useful in computing the probabilityof the intersection of Draw 2 balls at random withoutreplacement from an urn with 8 red balls and 4white balls.
2 Find the chance that both are General Multiplication RuleP(E1 E2 En) =P(E1) P(E2|E1) P(E3|E1 E2) P(En|E1 E2 En 1)Example 1. Anil and Beth roll two dice, andplay a game as follows. If the total is 5, A the total is 7, B wins. Otherwise, they play asecond round, and so on. FindP(En), forEn={A wins onnth round}.5 Example 2. I havenkeys, one of which opens alock. Trying keys at random without replacement,find the chance that thekth try opens the Law of Total probability From axiom A3,P(E) =P(E F) +P(E Fc).Using the definition of Conditional probability ,P(E) =P(E|F)P(F) +P(E|Fc)P(Fc) This isextremely useful. It may be difficultto computeP(E)directly, but easy to compute itonce we know whether or notFhas occurred. To generalize, say eventsF1, .. , Fnform apartitionif they are disjoint and ni=1Fi=S. Use a Venn diagram to argue thatP(E) = ni=1P(E Fi).
3 Apply Conditional probability to give thelawof total probability ,P(E) = ni=1P(E|Fi)P(Fi)7 Example 1. Eric s girlfriend comes round on agiven evening with probability If she does notcome round, the chance Eric watchesThe If she does, this chance drops to Findthe probability that Eric gets to watchThe Formula SometimesP(E|F)may be specified and wewould like to findP(F|E).Example 2. I call Eric and he says he iswatchingThe Wire. What is the chance hisgirlfriend is around? A simple manipulation givesBayes formula,P(F|E) =P(E|F)P(F)P(E)Proof. Combining this with the law of total probability ,P(F|E) =P(E|F)P(F)P(E|F)P(F) +P(E|Fc)P(Fc)9 Solution to Example 2. this computation can be viewed using a tree:10 Sometimes Conditional probability calculationscan give quite unintuitive 3. I have three cards. One is red onboth sides, another is red on one side and blackon the other, the third is black on both sides.
4 Ishuffle the cards and put one on the table, so youcan see that the upper side is red. What is thechance that the other side is black? is it1/2, or>1/2or<1/2?Solution11 Discussion problem. Suppose 99% of peoplewith HIV test positive, 95% of people withoutHIV test negative, and of people have is the chance that someone testing positivehas HIV?12 Example: Statistical inference via Bayes formulaRosencrantz and Guildenstern play a game whereR tosses a coin, and wins $1 if it lands on H orloses $1 on T. G is surprised to find that he losesthe first ten times they play. If G sprior beliefis that the chance of R having a two headed coinis , what is hisposterior belief?Note. Prior and posterior beliefs are assessmentsof probability before and after seeing an outcome is Heuristically,Eis independent ofFif thechance ofEoccurring is not affected by whetherFoccurs, ,P(E|F) =P(E)(1) We say thatEandFareindependentifP(E F) =P(E)P(F)(2)Note.
5 (2) is a rearrangement of (1). Check this!Note. It is clear from (2) that independence is asymmetric relationship. Also, (2) is properlydefined whenP(F) = (1) is a useful way to think aboutindependence; (2) is usually better to do IfEandFare independent, thenso 1: independence can be obviousDraw a card from a shuffled deck of 52 cards. LetE= card is a spadeandF= card is an ace. AreEandFindependent?SolutionExample 2: independence can be surprisingToss a coin 3 times. DefineA={at most one T}={HHH, HHT, HTH, THH}B={both H and T occur}={HHH, TTT} as an Assumption It is often convenient to suppose sometimes assume it without A sky diver has two chutes. LetE={main chute opens},P(E) = ;F={backup opens},P(F) = the chance that at least one opens,makingany necessary assumption Assuming independence does not justifythe assumption! Both chutes could fail because ofthe same rare event, such as freezing of Several Events Three eventsE,F,GareindependentifP(E F) =P(E) P(F)P(F G) =P(F) P(G)P(E G) =P(E) P(G)P(E F G)=P(E) P(F) P(G) IfE,F,Gare independent, thenEwill beindependent of any event formed Show thatEis independent ofF independence E,FandGarepairwise independentifEisindependent ofF,Fis independent ofG, andEis independent Toss a coin twice.
6 SetE={HH, HT},F={TH, HH}andG={HH, TT}.(a) Show thatE,FandGare pairwiseindependent.(b) By consideringP(E F G), show thatE,FandGare NOT Another way to see the dependence is thatP(E|F G) = 16=P(E).19 Example: Indepdendent trialsA sequence ofnindependent trials results in asuccesswith probabilitypand a failure withprobability1 p. What is the probability that at least one success occurs? exactlyksuccesses occur?20 Gambler s Ruin Problem. A and B play anindependent sequence of games. Each game, thewinner gets one dollar from the loser, and playcontinues until one player is bankrupt. A startswithidollars and B starts withN idollars. Awins each game with probabilityp. What is theprobability that A ends up with all the money?21 Conditional probability obeys the axiomsLetQF(E) =P(E|F). Then 0 QF(E) 1 QF(S) = 1 IfE1, E2, ..are disjoint, thenQF( i=1Ei) = i=1QF(Ei)SinceQFobeys the axioms, all our previouspropositions for probabilities give analogousresults for Conditional (Ec|F) = 1 P(E|F)P(A B|F) =P(A|F) +P(B|F) P(A B|F)22 Example: Insurance policies re-visitedInsurance companies categorize people into twogroups: accident prone (30%) or not.
7 An accidentprone person will have an accident within oneyear with probability ; otherwise, What isthe Conditional probability that a newpolicyholder will have an accident in his secondyear, given that the policyholder has had anaccident in the first year?23