Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator Lecture 11 CS 15 251 Spring 2010 Feb 16 2010 Probability Theory I Carnegie Mellon University We will consider chance experiments with a finite number of possible outcomes w1 w2 wn The 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 event Let X be a random variable which denotes the value of the outcome of a certain experiment We will assign probabilities to the possible outcomes of an experiment We do this by assigning to each outcome wj a nonnegative number m wj in such a way that m w1 m wn 1 The function m wj is called the distribution function of the random variable X Probabilities For any subset E of we define the probability of E to be the number P E given by P E m w w E event distribution function From Random Variables to Events For any random variable X and value a we can define the event E that X a P E P X a P t X t a From Random Variables to Events It s a function on the sample space 0 It s a variable with a probability distribution on its values You should be comfortable with both views Example 1 Consider an experiment in which a coin is tossed twice HH TT HT TH m HH m TT m HT m TH 1 4 Let E HH HT TH be the event that at least one head comes up Then probability of E is P E m HH m HT m TH 3 4 Notice that it is an immediate consequence P w m w Example 2 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 Let E be the event that either A or C wins P E m A m C 2 5 1 5 3 5 Theorem The probabilities satisfy the following properties P 1 P E 0 P A B P A P B for disjoint A and B P A 1 P A P A B P A P B for disjoint A and B Proof P A B m w w A B m w m w P A P B w A w B More Theorems For any events A and B P A P A B P A B For any events A and B P A B P A P B P A B Uniform Distribution When a coin is tossed and the die is rolled we assign an equal probability to each outcome The uniform distribution on a sample space containing n elements is the function m defined by m w 1 n for every w Example Consider 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 Example S 1 1 2 1 3 1 4 1 5 1 6 1 1 2 2 2 3 2 4 2 5 2 6 2 P E 6 1 36 1 3 2 3 3 3 4 3 5 3 6 3 1 4 2 4 3 4 4 4 5 4 6 4 E 1 5 2 5 3 5 4 5 5 5 6 5 P F 2 1 36 P E F 8 36 1 6 2 6 3 6 4 6 5 6 6 6 F A fair coin is tossed 100 times in a row What is the probability that we get exactly half heads The sample space is the set of all outcomes sequences H T 100 Each sequence in is equally likely and hence has probability 1 1 2100 Visually all sequences of 100 tosses t HHTTT TH P t 1 S Event E Set of sequences with 50 H s and 50 T s Set of all 2100 sequences H T 100 Probability of event E proportion of E in S 100 100 2 50 Birthday Paradox How many people do we need to have in a room to make it a favorable bet probability of success greater than 1 2 that two people in the room will have the same birthday And The Same Methods Again Sample space 365x We must find sequences that have no duplication of birthdays Event E w two numbers not the same 365 364 365 x 1 P E x 365 Birthday Paradox Number of People Probability 21 0 556 22 0 524 23 0 492 24 0 461 Infinite Sample Spaces A coin is tossed until the first time that a head turns up 1 2 3 4 A distribution function m n 2 n 1 1 P m w 1 2 4 w Infinite Sample Spaces Let E be the event that the first time a head turns up is after an even number of tosses E 2 4 6 1 1 1 1 P E 4 16 64 3 Conditional Probability Consider 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 Suppose that before the election is held A drops out of the race What are new probabilities to the events B and C P B A 2 3 P C A 1 3 Conditional Probability Let 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 0 Conditional Probability By the probability law m w E m w E c m w 1 k From here k E 1 1 c m wk P E E m wk m wk E P E k E Conditional Probability The probability of event F given event E is written P F E and is defined by m wk P F E P F E m wk E P E F E F E P E E proportion of F E F to E Suppose we roll a white die and black die What is the probability that the white is 1 given that the total is 7 event A white die 1 event B total 7 S 1 1 2 1 3 1 4 1 5 1 6 …
View Full Document
Unlocking...