Introduction to Probability and Statistics I Lecture 7 and 8 Basic Probability and Counting Methods
Computing theoretical probabilities:counting methods Great for gambling! Fun to compute! If outcomes are equally likely to occur P( A) # of ways A can occur total# of outcomes Note: these are called counting methods because we have to count the number of ways A can occur and the number of total possible outcomes
Summary of Counting Methods Counting methods for computing probabilities Permutations order matters! Combinations Order doesn t matter With replacement Without replacement Without replacement
Permutations Order matters! A permutation is an ordered arrangement of objects With replacement=once an event occurs, it can occur again (after you roll a 6, you can roll a 6 again on the same die) Without replacement=an event cannot repeat (after you draw an ace of spades out of a deck, there is 0 probability of getting it again)
Combinations Order doesn t matter Introduction to combination function, or choosing Written as: n C r or n r Spoken: n choose r
Combinations How many two-card hands can I draw from a deck when order does not matter (eg, ace of spades followed by ten of clubs is the same as ten of clubs followed by ace of 52 cards 51 cards spades) 52x51 2 52! (52 2)!2
Summary of Counting Methods Counting methods for computing probabilities Permutations order matters! Combinations Order doesn t matter With replacement: n r Without replacement: n(n-1)(n-2) (n-r+1)= n! ( n r)! Without replacement: n r n! ( n r)! r!
Important Terms Random Experiment a process leading to an uncertain outcome Basic Outcome a possible outcome of a random experiment Sample Space the collection of all possible outcomes of a random experiment Event any subset of basic outcomes from the sample space
32 Probability Probability the chance that an uncertain event will occur (always between 0 and 1) 1 Certain 0 P(A) 1 For any event A 5 0 Impossible
Assessing Probability There are three approaches to assessing the probability of an uncertain event: 1 classical probability N probability of event A A N numberof outcomesthat satisfythe event total numberof outcomesinthe samplespace Assumes all outcomes in the sample space are equally likely to occur
Counting the Possible Outcomes Use the Combinations formula to determine the number of combinations of n things taken k at a time C n k k!(n n! k)! where n! = n(n-1)(n-2) (1) 0! = 1 by definition
Assessing Probability Three approaches (continued) 2 relative frequency probability n probability of event A A n numberof events inthe populationthat satisfyevent total numberof events inthe population A the limit of the proportion of times that an event A occurs in a large number of trials, n 3 subjective probability an individual opinion or belief about the probability of occurrence
Probability Postulates 1 If A is any event in the sample space S, then 0 P(A) 2 Let A be an event in S, and let O i denote the basic outcomes Then (the notation means that the summation is over all the basic outcomes in A) 1 P(A) P(O i) A 3 P(S) = 1
33 Probability Rules The Complement rule: P( A) 1P(A) ie, P(A) P(A) 1 The Addition rule: The probability of the union of two events is P(A B) P(A) P(B) P(A B)
A Probability Table Probabilities and joint probabilities for two events A and B are summarized in this table: B B A P(A B) P(A B) P(A) A P( A B) P( A B) P(A) P(B) P(B) P(S) 10
Addition Rule Example Consider a standard deck of 52 cards, with four suits: Let event A = card is an Ace Let event B = card is from a red suit
Addition Rule Example (continued) P(Red U Ace) = P(Red) + P(Ace) - P(Red Ace) = 26/52 + 4/52-2/52 = 28/52 Color Type Red Black Total Ace 2 2 4 Non-Ace 24 24 48 Total 26 26 52 Don t count the two red aces twice!
Conditional Probability A conditional probability is the probability of one event, given that another event has occurred: P(A B) P(A B) P(B) The conditional probability of A given that B has occurred P(B A) P(A B) P(A) The conditional probability of B given that A has occurred
Conditional Probability Example Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD) 20% of the cars have both What is the probability that a car has a CD player, given that it has AC? ie, we want to find P(CD AC)
Conditional Probability Example Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD) 20% of the cars have both CD No CD Total AC 2 5 7 No AC 2 1 3 Total 4 6 10 (continued) P(CD AC) P(CD AC) P(AC) 2 7 2857
Conditional Probability Example (continued) Given AC, we only consider the top row (70% of the cars) Of these, 20% have a CD player 20% of 70% is 2857% CD No CD Total AC 2 5 7 No AC 2 1 3 Total 4 6 10 P(CD AC) P(CD AC) P(AC) 2 7 2857
Multiplication Rule Multiplication rule for two events A and B: P(A B) P(A B)P(B) also P(A B) P(B A) P(A)
Multiplication Rule Example P(Red Ace) = P(Red Ace)P(Ace) 2 4 4 52 2 52 number of cards that are redandace total number of cards Color Type Red Black Total Ace 2 2 4 Non-Ace 24 24 48 Total 26 26 52 2 52
Statistical Independence Two events are statistically independent if and only if: P(A B) P(A)P(B) Events A and B are independent when the probability of one event is not affected by the other event If A and B are independent, then P(A B) P(A) if P(B)>0 P(B A) P(B) if P(A)>0
Statistical Independence Example Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD) 20% of the cars have both CD No CD Total AC 2 5 7 No AC 2 1 3 Total 4 6 10 Are the events AC and CD statistically independent?
Statistical Independence Example P(AC CD) = 02 CD No CD Total AC 2 5 7 No AC 2 1 3 Total 4 6 10 (continued) P(AC) = 07 P(CD) = 04 P(AC)P(CD) = (07)(04) = 028 P(AC CD) = 02 P(AC)P(CD) = 028 So the two events are not statistically independent
34 Bivariate Probabilities Outcomes for bivariate events: B 1 B 2 B k A 1 P(A 1 B 1 ) P(A 1 B 2 ) P(A 1 B k ) A 2 P(A 2 B 1 ) P(A 2 B 2 ) P(A 2 B k ) A h P(A h B 1 ) P(A h B 2 ) P(A h B k )
Joint and Marginal Probabilities The probability of a joint event, A B: P(A B) number of outcomessatisfyinga andb total number of elementaryoutcomes Computing a marginal probability: P(A) P(A B 1) P(A B2) P(A B k ) Where B 1, B 2,, B k are k mutually exclusive and collectively exhaustive events
Marginal Probability Example P(Ace) P(Ace Red) P(Ace Black) 2 52 2 52 4 52 Color Type Red Black Total Ace 2 2 4 Non-Ace 24 24 48 Total 26 26 52
Using a Tree Diagram Given AC or no AC: All Cars 2 7 5 7 2 3 P(AC CD) = 2 P(AC CD) = 5 P(AC CD) = 2 1 3 P(AC CD) = 1
Odds The odds in favor of a particular event are given by the ratio of the probability of the event divided by the probability of its complement The odds in favor of A are odds P(A) 1-P(A) P(A) P(A)
Odds: Example Calculate the probability of winning if the odds of winning are 3 to 1: odds 3 1 P(A) 1-P(A) Now multiply both sides by 1 P(A) and solve for P(A): 3 x (1- P(A)) = P(A) 3 3P(A) = P(A) 3 = 4P(A) P(A) = 075
Overinvolvement Ratio The probability of event A 1 conditional on event B 1 divided by the probability of A 1 conditional on activity B 2 is defined as the overinvolvement ratio: P(A P(A 1 1 B B An overinvolvement ratio greater than 1 implies that event A 1 increases the conditional odds ration in favor of B 1 : P(B1 A1) P(B1) P(B A ) P(B ) 2 1 1 2 ) ) 2
35 Bayes Theorem P(E i A) P(A E P(A E i P(A) 1 )P(E ) )P(E i 1 P(A E ) P(A E 2 i )P(E ) )P(E 2 i ) P(A E k )P(E k ) where: E i = i th event of k mutually exclusive and collectively exhaustive events A = new event that might impact P(E i )
Bayes Theorem Example A drilling company has estimated a 40% chance of striking oil for their new well A 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 Given that this well has been scheduled for a detailed test, what is the probability that the well will be successful?
Bayes Theorem Example (continued) Let S = successful well U = unsuccessful well P(S) = 4, P(U) = 6 (prior probabilities) Define the detailed test event as D Conditional probabilities: P(D S) = 6 P(D U) = 2 Goal is to find P(S D)
Bayes Theorem Example Apply Bayes Theorem: (continued) P(S D) P(D P(D S)P(S) S)P(S) P(D U)P(U) (6)(4) (6)(4) (2)(6) 24 24 12 667 So the revised probability of success (from the original estimate of 4), given that this well has been scheduled for a detailed test, is 667