1、Basic ProbabilityChapter 4ObjectivesThe objectives for this chapter are:nTo understand basic probability concepts.nTo understand conditional probability nTo be able to use Bayes Theorem to revise probabilitiesnTo learn various counting rulesBasic Probability ConceptsnProbability the chance that an u
2、ncertain event will occur(always between 0 and 1)nImpossible Event an event that has no chance of occurring(probability=0)nCertain Event an event that is sure to occur(probability=1)Assessing ProbabilityThere are three approaches to assessing the probability of an uncertain event:1.a priori -based o
3、n prior knowledge of the process2.empirical probability3.subjective probabilityoutcomespossibleofnumbertotaloccurseventthein which waysofnumberTX based on a combination of an individuals past experience,personal opinion,and analysis of a particular situation outcomespossibleofnumbertotaloccurseventt
4、hein which waysofnumber Assuming all outcomes are equally likelyprobability of occurrenceprobability of occurrenceExample of a priori probabilityWhen randomly selecting a day from the year 2015 what is the probability the day is in January?2015in days ofnumber totalJanuaryin days ofnumber January In
5、 Day ofy ProbabilitTX365312015in days 365Januaryin days 31 TXExample of empirical probabilityTaking StatsNot Taking StatsTotalMale 84145229Female 76134210Total160279439Find the probability of selecting a male taking statistics from the population described in the following table:191.043984people ofn
6、umber totalstats takingmales ofnumber Probability of male taking statsSubjective probabilitynSubjective probability may differ from person to personnA media development team assigns a 60%probability of success to its new ad campaign.nThe chief media officer of the company is less optimistic and assi
7、gns a 40%of success to the same campaignnThe assignment of a subjective probability is based on a persons experiences,opinions,and analysis of a particular situationnSubjective probability is useful in situations when an empirical or a priori probability cannot be computedEventsEach possible outcome
8、 of a variable is an event.nSimple eventnAn event described by a single characteristicne.g.,A day in January from all days in 2015nJoint eventnAn event described by two or more characteristicsne.g.A day in January that is also a Wednesday from all days in 2015nComplement of an event A (denoted A)nAl
9、l events that are not part of event Ane.g.,All days from 2015 that are not in JanuarySample SpaceThe Sample Space is the collection of all possible eventse.g.All 6 faces of a die:e.g.All 52 cards of a bridge deck:Organizing&Visualizing EventsnVenn Diagram For All Days In 2015Sample Space(All Days In
10、 2015)January DaysWednesdaysDays That Are In January and Are WednesdaysOrganizing&Visualizing EventsnContingency Tables -For All Days in 2015nDecision TreesAll Days In 2015Not Jan.Jan.Not Wed.Wed.Wed.Not Wed.Sample SpaceTotalNumberOfSampleSpaceOutcomesNot Wed.27 286 313 Wed.4 48 52Total 31 334 365 J
11、an.Not Jan.Total 4 27 48286(continued)Definition:Simple ProbabilitynSimple Probability refers to the probability of a simple event.nex.P(Jan.)nex.P(Wed.)P(Jan.)=31/365P(Wed.)=52/365Not Wed.27 286 313 Wed.4 48 52Total 31 334 365 Jan.Not Jan.TotalDefinition:Joint ProbabilitynJoint Probability refers t
12、o the probability of an occurrence of two or more events(joint event).nex.P(Jan.and Wed.)nex.P(Not Jan.and Not Wed.)P(Jan.and Wed.)=4/365P(Not Jan.and Not Wed.)=286/365Not Wed.27 286 313 Wed.4 48 52Total 31 334 365 Jan.Not Jan.TotalnMutually exclusive eventsnEvents that cannot occur simultaneouslyEx
13、ample:Randomly choosing a day from 2015 A=day in January;B=day in FebruarynEvents A and B are mutually exclusiveMutually Exclusive EventsCollectively Exhaustive EventsnCollectively exhaustive eventsnOne of the events must occur nThe set of events covers the entire sample spaceExample:Randomly choose
14、 a day from 2015 A=Weekday;B=Weekend;C=January;D=Spring;nEvents A,B,C and D are collectively exhaustive(but not mutually exclusive a weekday can be in January or in Spring)nEvents A and B are collectively exhaustive and also mutually exclusiveComputing Joint and Marginal ProbabilitiesnThe probabilit
15、y of a joint event,A and B:nComputing a marginal(or simple)probability:nWhere B1,B2,Bk are k mutually exclusive and collectively exhaustive eventsoutcomeselementaryofnumbertotalBandAsatisfyingoutcomesofnumber)BandA(P)BdanP(A)BandP(A)BandP(AP(A)k21Joint Probability ExampleP(Jan.and Wed.)36542015in da
16、ys ofnumber total Wed.are and Jan.in are that days ofnumber Not Wed.27 286 313 Wed.4 48 52Total 31 334 365 Jan.Not Jan.TotalMarginal Probability ExampleP(Wed.)36552365483654)Wed.andJan.P(Not Wed.)andJan.(PNot Wed.27 286 313 Wed.4 48 52Total 31 334 365 Jan.Not Jan.Total P(A1 and B2)P(A1)TotalEventMar
17、ginal&Joint Probabilities In A Contingency TableP(A2 and B1)P(A1 and B1)EventTotal1Joint ProbabilitiesMarginal(Simple)Probabilities A1 A2B1B2 P(B1)P(B2)P(A2 and B2)P(A2)Probability Summary So FarnProbability is the numerical measure of the likelihood that an event will occurnThe probability of any e
18、vent must be between 0 and 1,inclusivelynThe sum of the probabilities of all mutually exclusive and collectively exhaustive events is 1CertainImpossible0.5100 P(A)1 For any event A1P(C)P(B)P(A)If A,B,and C are mutually exclusive and collectively exhaustiveGeneral Addition RuleP(A or B)=P(A)+P(B)-P(A
19、 and B)General Addition Rule:If A and B are mutually exclusive,then P(A and B)=0,so the rule can be simplified:P(A or B)=P(A)+P(B)For mutually exclusive events A and BGeneral Addition Rule ExampleP(Jan.or Wed.)=P(Jan.)+P(Wed.)-P(Jan.and Wed.)=31/365+52/365-4/365 =79/365Dont count the four Wednesdays
20、 in January twice!Not Wed.27 286 313 Wed.4 48 52Total 31 334 365 Jan.Not Jan.TotalComputing Conditional ProbabilitiesnA conditional probability is the probability of one event,given that another event has occurred:P(B)B)andP(AB)|P(AP(A)B)andP(AA)|P(BWhere P(A and B)=joint probability of A and B P(A)
21、=marginal or simple probability of AP(B)=marginal or simple probability of BThe conditional probability of A given that B has occurredThe conditional probability of B given that A has occurrednWhat is the probability that a car has a GPS,given that it has AC?i.e.,we want to find P(GPS|AC)Conditional
22、 Probability ExamplenOf the cars on a used car lot,70%have air conditioning(AC)and 40%have a GPS.20%of the cars have both.Conditional Probability ExampleNo GPSGPSTotalAC0.20.50.7No AC0.20.10.3Total0.40.6 1.0nOf the cars on a used car lot,70%have air conditioning(AC)and 40%have a GPS and 20%of the ca
23、rs have both.0.28570.70.2P(AC)AC)andP(GPSAC)|P(GPS (continued)Conditional Probability ExampleNo GPSGPSTotalAC0.20.50.7No AC0.20.10.3Total0.40.6 1.0nGiven AC,we only consider the top row(70%of the cars).Of these,20%have a GPS.20%of 70%is about 28.57%.0.28570.70.2P(AC)AC)andP(GPSAC)|P(GPS (continued)U
24、sing Decision TreesHas ACDoes not have ACHas GPSDoes not have GPSHas GPSDoes not have GPSP(AC)=0.7P(AC)=0.3P(AC and GPS)=0.2P(AC and GPS)=0.5P(AC and GPS)=0.1P(AC and GPS)=0.27.5.3.2.3.1.AllCars7.2.Given AC or no AC:ConditionalProbabilitiesUsing Decision TreesHas GPSDoes not have GPSHas ACDoes not h
25、ave ACHas ACDoes not have ACP(GPS)=0.4P(GPS)=0.6P(GPS and AC)=0.2P(GPS and AC)=0.2P(GPS and AC)=0.1P(GPS and AC)=0.54.2.6.5.6.1.AllCars4.2.Given GPS or no GPS:(continued)ConditionalProbabilitiesIndependencenTwo events are independent if and only if:nEvents A and B are independent when the probabilit
26、y of one event is not affected by the fact that the other event has occurredP(A)B)|P(AMultiplication RulesnMultiplication rule for two events A and B:P(B)B)|P(AB)andP(A P(A)B)|P(ANote:If A and B are independent,thenand the multiplication rule simplifies toP(B)P(A)B)andP(A Marginal ProbabilitynMargin
27、al probability for event A:nWhere B1,B2,Bk are k mutually exclusive and collectively exhaustive events)P(B)B|P(A)P(B)B|P(A)P(B)B|P(A P(A)kk2211Bayes TheoremnBayes Theorem is used to revise previously calculated probabilities based on new information.nDeveloped by Thomas Bayes in the 18th Century.nIt
28、 is an extension of conditional probability.Bayes Theoremnwhere:Bi=ith event of k mutually exclusive and collectively exhaustive eventsA=new event that might impact P(Bi)P(BB|P(A)P(BB|P(A)P(BB|P(A)P(BB|P(AA)|P(Bk k 2 2 1 1 i i i Bayes Theorem ExamplenA drilling company has estimated a 40%chance of s
29、triking oil for their new well.nA detailed test has been scheduled for more information.Historically,60%of successful wells have had detailed tests,and 20%of unsuccessful wells have had detailed tests.nGiven that this well has been scheduled for a detailed test,what is the probability that the well
30、will be successful?nLet S=successful well U=unsuccessful wellnP(S)=0.4,P(U)=0.6 (prior probabilities)nDefine the detailed test event as DnConditional probabilities:P(D|S)=0.6 P(D|U)=0.2nGoal is to find P(S|D)Bayes Theorem Example(continued)0.6670.120.240.24(0.2)(0.6)(0.6)(0.4)(0.6)(0.4)U)P(U)|P(DS)P
31、(S)|P(DS)P(S)|P(DD)|P(SBayes Theorem Example(continued)Apply Bayes Theorem:So the revised probability of success,given that this well has been scheduled for a detailed test,is 0.667nGiven the detailed test,the revised probability of a successful well has risen to 0.667 from the original estimate of
32、0.4Bayes Theorem ExampleEventPriorProb.Conditional Prob.JointProb.RevisedProb.S(successful)0.40.6(0.4)(0.6)=0.240.24/0.36=0.667U(unsuccessful)0.60.2(0.6)(0.2)=0.120.12/0.36=0.333Sum=0.36(continued)Counting Rules Are Often Useful In Computing ProbabilitiesnIn many cases,there are a large number of po
33、ssible outcomes.nCounting rules can be used in these cases to help compute probabilities.Counting RulesnRules for counting the number of possible outcomesnCounting Rule 1:nIf any one of k different mutually exclusive and collectively exhaustive events can occur on each of n trials,the number of poss
34、ible outcomes is equal tonExamplenIf you roll a fair die 3 times then there are 63=216 possible outcomesknCounting RulesnCounting Rule 2:nIf there are k1 events on the first trial,k2 events on the second trial,and kn events on the nth trial,the number of possible outcomes isnExample:nYou want to go
35、to a park,eat at a restaurant,and see a movie.There are 3 parks,4 restaurants,and 6 movie choices.How many different possible combinations are there?nAnswer:(3)(4)(6)=72 different possibilities(k1)(k2)(kn)(continued)Counting RulesnCounting Rule 3:nThe number of ways that n items can be arranged in o
36、rder isnExample:nYou have five books to put on a bookshelf.How many different ways can these books be placed on the shelf?nAnswer:5!=(5)(4)(3)(2)(1)=120 different possibilitiesn!=(n)(n 1)(1)(continued)Counting RulesnCounting Rule 4:nPermutations:The number of ways of arranging X objects selected fro
37、m n objects in order isnExample:nYou have five books and are going to put three on a bookshelf.How many different ways can the books be ordered on the bookshelf?nAnswer:different possibilities(continued)X)!(nn!Pxn6021203)!(55!X)!(nn!PxnCounting RulesnCounting Rule 5:nCombinations:The number of ways
38、of selecting X objects from n objects,irrespective of order,isnExample:nYou have five books and are going to select three are to read.How many different combinations are there,ignoring the order in which they are selected?nAnswer:different possibilities(continued)X)!(nX!n!Cxn10(6)(2)1203)!(53!5!X)!(nX!n!CxnChapter SummaryIn this chapter we covered:nUnderstanding basic probability concepts.nUnderstanding conditional probability nUsing Bayes Theorem to revise probabilitiesnVarious counting rules