220 likes | 497 Views
Bayes ’ Theorem. Susanna Kujanpää OUAS 6.12.2012. Bayes ’ Theorem. This is a theorem with two distinct interpretations . 1) Bayesian interpretation : it shows how a subjective degree of belief should rationally change to account for evidence. Bayes ’ Theorem.
E N D
Bayes’ Theorem Susanna Kujanpää OUAS 6.12.2012
Bayes’ Theorem • This is a theorem with twodistinctinterpretations. 1) Bayesianinterpretation: itshowshow a subjectivedegree of beliefshouldrationallychange to account for evidence
Bayes’ Theorem 2) Frequentistinterpretation: itrelatesinverserepresentations of the probalilitiesconcerningtwoevents.
Bayes’ Theorem • If A and B areevents, then where P(A|B) is conditionalprobability and
Bayes’ Theorem • In the special case of binarypartition
Bayes’ Theorem • EXAMPLE: Lisa candecide to gostudybycarorbus. Because of hightraffic, ifshedecides to go bycar, there is a 50% chanceshewillbelate. Ifshegoesbybus, the probability of being late is only 20%.
Bayes’ Theorem Supposethat Lisa is lateoneday, and her teacherwishes to estimate the probability thatshedrove to schoolthatonedaybycar. Sinceshedoesn’tknowwhichmode of transportation Lisa usuallyuses, shegives a priorprobability of 1/3 to bothpossibilities. What is the teacher’sestimateof the probabilitythat Lisa drove to the school ?
Bayes’ Theorem • Solution: Thisinformation is given A = event Lisa comesby a car = Lisa comesby a bus B= event Lisa is latefromschool and P(A) = P( ) = 1/3 P(B|A) = 0.5 P(B| ) = 0.2
Bayes’ Theorem Wewant to calculate P (A|B) and byBayes Theorem, this is =
Bayes’ Theorem • Thisexamplecanbevisualized with treediagrams:
Bayes’ Theorem And the valuesare:
Bayes’ Theorem • EXAMPLE Lisa is graduating at outdoorceremony tomorrow. In recentyears, ithasrained onlyoneweekeachyear. Now, the weatherman haspredictedrain for tomorrow. Whenit actuallyrains, the weathermancorrectly forecastsrain 90% of the time. What is the probabilitythatitwillrain on graduatingday ?
Bayes’ Theorem • Solution: A = Itrains on graduatingday = Itdoesn’train on graduatingday B= weathermanpredictsrain and P(A) = 7/365 = 0.019 P( ) = 358/365 = 0.981 P(B|A) = 0.9 P(B| ) = 0.1
Bayes’ Theorem NowbyBayesTheorem, this is
EXERCISES: 1) Supposethat Mike candecide to goworkbybus, carortrain. If he decides to gobycar, there is 45% chance he willbelate. Ifhe goesbybus, there is 25% chance of beinglate. The train is almostneverlate, with probability of 2%, butit is moreexpensivethan the bus. Supposethat Mike is lateone day and hisfriendwishes to estimate the probabilitythat he drove to workthatdaybycar (he gives the probability of 1/3 to eachpossibilities). What is the friend’sestimate of the probabilitythat Mike drove to work ?
2) In the village, 51% of the adultsaremales. One of the adult is randomlyselected for a surveyinvolvingcreditcardusage. Later wasnoticedthat the selectedsurvey subjectwasusingheadachemedicin. Also, 9.5% of malesusemedicin and 1.7% of females. Usethisadditionalinformation to find the probabilitythat the selected subject is male.
3) A firstcompanymakes 80% of the products, the secondmakes 15% of them and the thirdmakes the other 5%. The firstcompany have a 4% rate of defects, the secondhave a 6% rate of defects and the thirdhave a 9%. If a randomlyselectedproduct is thentested and is found to bedefective, find the probabilitythatitwas made by the first company.
ANSWERS: 1) 0.625 2) 0.853 3) 0.703