An Introduction to Probability Probability, odds, outcomes and events
Definitions 5 Experiment – any observation or measurement of a random phenomenon (the outcome cannot be predicted with certainty) Simple event – the most basic outcome of an experiment Outcomes– possible results of an experiment Sample Space – the set of all possible outcomes (i.e., the collection of all simple events Theoretical Probability: n(E)/n(S), ( # of favorable outcomes)/(total # of outcomes)
Terminology 3 Empirical probability: P(E) = (# of times event E occurred)/(# of times experiment was performed) –arrived at by experimentation Did: P(face card) = 12/52=0.2307…. P(not a face card)= =0.7693… =40/52 Law of Large Numbers (Law of averages): An an experiment is repeated more and more times, the proportion of outcomes favorable to any particular event will come closer and closer to the theoretical probability of that event
Probability questions 5 “I have two children. One is a boy, and one is as a…..” What is the chance that I have two boys? Ans: 1/3: outcomes-- BB, BG, GG “I have two children. The older is a boy, and …..” What is the chance that I have two boys? Ans: ½ Experiments rolling die: rollDie.java; compute probabilityrollDie.java
Birthday problem: 4 How many people are needed in a room so that the probability that there are two people whose birthdays are the exactly the same day is roughly ½? How many pairs of dates? 365x365; How many pairs which are guaranteed that no two the same: 365x364; (364*365)/(365*365) = 364/365=0.9972… If probability no two the same is , then P(2 same)= = …
Birthday problem: (cont.) 3 3, no two the same: (365*364*363)/(365*365*365)=0.9917; P(same)= …= … 4 w/ two the same 1- (365*364*363*362)/(365)^4 = ; Pattern:
Birthday problem: (cont.) # people in rmP(2 sharing birthday)
Birthday problem: (cont.) 2 Thus, at 23 people, the P(2 people share birthday) = Class experiment w/ birthdays
Computing probabilities 3 P flush, full house; P red or face card? Need general addition Rule: P(A or B)=P(A)+P(B)-P(A B) P(R or F)= P(R)+P(F)-P(R F) =( )/52=8/13 Them: club or 2, spade or diamond
Conditional probabilities 3 P(B|A)=P(A B)/P(A), where P(B|A) is the probability of event B, given that A has already happened Ex/2 fair coins are tossed –at least one is a head -- find the probability that both are heads: A= 1 head; B = both heads; P(B|A)= P(A B)/P(A)=1/4/3/4=1/3
Conditional probabilities 6 P(B|A)=P(A B)/P(A), where P(B|A) is the probability of event B, given that A has already happened Ex/2 fair coins are tossed –at least one is a head -- find the probability that both are heads: A= 1 head; B = both heads; P(B|A)= P(A B)/P(A)=1/4//3/4=1/3 Do ex 36,44 on sheet Hw/ 1,3,37,45 Hi/ 2,35,38,43,46