Probability Theory ISlide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 57Probability Theory IGreat Theoretical Ideas In Computer ScienceVictor AdamchikDanny SleatorCS 15-251 Spring 2010Lecture 11 Feb. 16, 2010Carnegie Mellon UniversityWe will consider chance experiments with a finite number ofpossible outcomes w1, w2, . . . , wnThe sample space of the experiment is the set of all possible outcomes..The roll of a die: = {1,2,3,4,5,6}Each subset of a sample space is defined to be an event.The event: E = {2,4,6}Probability of a eventWe will assign probabilities to the possible outcomes of an experiment.Let X be a random variable which denotes the value of the outcome of a certain experiment.We do this by assigning to each outcome wj a nonnegative number m(wj) in such a way thatm(w1) + … + m(wn)=1The function m(wj) is called the distribution function of the random variable X.ProbabilitiesFor any subset E of , we define the probability of E to be the number P(E) given byEwm(w)P(E)eventdistribution functionFrom Random Variables to EventsFor any random variable X and value a, we can define the event E that X = aP(E) P(E) == P(X=a) P(X=a) == P({t P({t | X(t)=a})| X(t)=a})From Random Variables to EventsIt’s a function on the sample space ->[0,)It’s a variable with a probability distribution on its valuesYou should be comfortable with both viewsExample 1Let E ={HH,HT,TH} be the event that at least one head comes up. Then probability of E is= {HH,TT,HT,TH}m(HH)=m(TT)=m(HT)=m(TH)=1/4Consider an experiment in which a coin is tossed twice. P(E) = m(HH)+m(HT)+m(TH) =3/4Notice that it is an immediate consequenceNotice that it is an immediate consequenceP({w}) = m(w)Example 2Let E be the event that either A or C wins.Let E be the event that either A or C wins.Three people, A, B, and C, are running for the same office, and we assume that one and only one of them wins. Suppose that A and B have the same chance of winning, but that C has only 1/2 the chance of A or B.P(E) = m(A)+m(C)= 2/5+1/5=3/5TheoremThe probabilities satisfy the following properties:P(E) 0P() = 1P(A B) = P(A) + P(B), for disjoint A and BP(A) = 1- P(A)P(A B) = P(A) + P(B), for disjoint A and BProof.P(B)P(A)m(w)m(w)m(w)B)P(ABwAwBAwMore TheoremsFor any events A and BP(A) = P(A B) + P(A B)For any events A and BP(AB) = P(A) + P(B) - P(A B)Uniform DistributionThe uniform distribution on a sample space containing n elements is the function m defined bym(w) = 1/nfor every wWhen a coin is tossed and the die is rolled, we assign an equal probability to each outcome.ExampleConsider the experiment that consists of rolling a pair of dice. What is the probability of getting a sum of 7 or a sum of 11?We assume that each of 36 outcomes is equally likely.(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5), (6,6) }P(E)= 6 * 1/36ExampleS = {S = {EFP(F)= 2 * 1/36P(E F)= 8/36A fair coin is tossed 100 A fair coin is tossed 100 times in a rowtimes in a rowWhat is the probability that What is the probability that we get exactly half heads?we get exactly half heads?The sample space is the set of all outcomes (sequences) {H,T}100Each sequence in is equally likely, and hence has probability 1/||=1/2100 = all sequencesof 100 tosses t = HHTTT……THP(t) = 1/|S|VisuallySet of all Set of all 22100100 sequencessequences{H,T}{H,T}100100Probability of event Probability of event EE = proportion of = proportion of EE in in SSEvent E = Set of Event E = Set of sequences with sequences with 5050 HH’s and ’s and 5050 TT’s’s1001005050/ 2/ 2100100How many people do we need to have in a room to make it a favorablebet (probability of success greater than 1/2) that two people in the room will havethe same birthday?Birthday ParadoxAnd The Same Methods Again!Sample space = 365xEvent E = { w Event E = { w | two numbers not the same } | two numbers not the same }We must find sequences that have noduplication of birthdays.x3651)x(365...364365P(E)Birthday ParadoxNumber of PeopleProbability21 0.55622 0.52423 0.49224 0.461Infinite Sample SpacesA coin is tossed until the first time that a head turns up. = {1, 2, 3, 4, …}A distribution function: m(n) = 2-n.1...4121m(w)PwInfinite Sample SpacesLet E be the event that the first time a head turns up is after an even number of tosses. E = {2, 4, 6, …}31...64116141P(E) Conditional ProbabilityConsider our voting example: three candidates A, B, and C are running for office. We decided that A and B have an equal chance of winning and C is only 1/2 as likely to win as A.P(B|A)=2/3 P(C|A)=1/3Suppose that before the election is Suppose that before the election is held, A drops out of the race.held, A drops out of the race.What are new probabilities to the probabilities to the events B and Cevents B and CConditional ProbabilityLet = {w1, w2, . . . , wr} be the original sample space with distribution function m(wk). Suppose we learn that the event E has occurred. We want to assign a new distribution function m(wk |E) to reflect this fact.It is reasonable to assume that the probabilities for wk in E should have the same relative magnitudes that they had before we learned that E had occurred: m(wk |E) = c m(wk), where c is some constant.Also, if wk is not in E, we want m(wk |E) = 0Conditional ProbabilityBy the probability law:1)m(wcE)|m(wE)|m(wEkEkkFrom here,P(E)1)m(w1cEkP(E))m(wE)|m(wkkFFEEproportion proportion of F of F E E Conditional ProbabilityThe probability of event F given event E is written P(F | E ) and is defined byto Eto EP(E)E)P(FP(E))m(wE)|m(wE)|P(FEFkEFkevent A = {white die = 1}event A = {white die = 1}event B = {total = 7}event B = {total =
View Full Document