Probability

Section 9 Probability of A =

Number of outcomes for which A happens Probability Total number of outcomes (sample space)

In this section we summarise the key issues in the What is the probability of drawing an from a shuf- basic probability teach-yourself document and provide fled pack of cards? a single simple example of each concept. There are 4 . There are 52 cards in total. There- This presentation is intended to be reinforced by the fore the probability is many examples in the teach-yourself document and examples paper 10.

4 1 P( ace )= = 52 13

129 130 Adding Probabilities When Not to Add Probabilities

When the events are not mutually exclusive. P(A or B)= P(A)+ P(B) provided A and B cannot happen together, i.e. A and B must be mutually exclusive outcomes.

What is the probability of drawing an ace or a A and B from a shuffled pack of cards? 1 P( ace )= 13 1 P( king )= A B 13 = A or B

1 1 2 P( ace or king )= + = P(A or B)= P(A)+ P(B) P(A and B) ⇒ 13 13 13 −

131 132 Non-Exclusive Events

What is the probability of drawing an ace or a spade Multiplying Probabilities from a shuffled pack of cards? 1 13 1 P( ace )= P( spade )= = 13 52 4 P(A and B)= P(A) P(B) but P( ace or spade ) is not the sum of these values × because the outcomes “ace” and “spade” are not ex- provided A is not affected by the outcome of B and B clusive; it is possible to have them both together by is not affected by the outcome of A, i.e. A and B must drawing the ace of . be independent.

To calculate P( ace or spade ) I have two shuffled packs of cards and draw a card from each of them. What is the probability that I draw either use the formula from the previous slide: two aces? 1 P( ace )= P( ace )+ P( spade ) P( ) 13 1 1 − 1 4 + = 13 4 − 52 13

1 1 1 P( ace and ace )= = or use the original definition of probability. 13 × 13 169 number of aces and spades 4 + 13 1 4 = − = total number of cards 52 13

133 134 Non-independent Events Tree Diagram

I have a single pack of cards. I draw a card, then draw a second card without putting the first card back in the We can use a tree diagram to help us work this out. pack. What is the probability that I draw two aces? 3 1 Ace = 3/51 663 221 This time the probability that I get an ace as the sec- ond card is affected by whether or not I removed an Ace ace from the pack when I drew the first card. 1/13 48/51 Not 48 We use the notation P(B A) to denote the probability Ace 663 | that B happens, given that we know that A happened. 48 Ace This is called a conditional probability. 4/51 663

12/13 Not Ace

P(A and B)= P(A B) P(B) Not 564 | 47/51 Ace 663 Thus: First card Second card

P( [second = ace] and [first = ace] ) = P( second = ace first = ace ) P( first = ace ) The probability that both cards are aces = 1 . | 221

135 136 Another Example Notation I have a single pack of cards. I draw a card, then draw a second card without putting the first card back in the Intersection AND pack. What is the probability that the second card is T an ace, given that the first card was not an ace? Union OR

Ace S 3/51 Thus the conditional probability formula

Ace P(A and B)= P(A B) P(B) | 1/13 is more normally written 48/51 Not Ace

Ace P(A B)= P(A B) P(B) 4/51 ∩ |

12/13 Not Ace and instead of

Not 47/51 P(A or B)= P(A)+ P(B) P(A and B) Ace − First card Second card we write P(A B)= P(A)+ P(B) P(A B) ∪ − ∩ P( second = ace first = not ace )= 4 | 51 137 138 Permutations

Ordering Objects n! nPr = (n r)! − is the number of ways of choosing r items from n when the order of the chosen items matters. The number of different orders in which n unique ob- jects can be placed is n! (n factorial)

Ten people are involved in a race. I wish to make a I have three cards with values 2, 3 and 4. They are poster for every possible winning combination of gold, shuffled into a random order. What is the probability silver and bronze medal winners. How many posters they are in the order 2, 3, 4? will I need?

The number of possible orders for three cards is 3! We need to know the number of ways of choosing The probability the cards are found in one specific or- three people out of 10, taking account of the order. der is therefore 1 = 1. 3! 6 This is 10! P = = 10 9 8 = 720 10 3 7! × × So I would need rather a lot of posters.

139 140 Combinations Lottery Example 1

n! nCr = (n r)!r! If what is the probability of winning the jackpot in the − is the number of ways of choosing r items from n national lottery? There are 49 balls and you have to when the order of the chosen items does not matter. match all six to win.

I have a single pack of cards. I draw a card, then draw Method 1: a second card without putting the first card back in the 6 5 4 3 2 1 1 pack. What is the probability that I draw two aces? = 49 × 48 × 47 × 46 × 45 × 44 13983816

The number of ways of drawing 2 cards from 52 is 52C2. Method 2: 1 1 The number of ways of getting two aces is the number = number of ways of choosing 6 balls from 49C6 of ways of drawing 2 aces from the 4 aces in the pack. 49, where order does not matter This is 4C2.

The probability that I draw two aces is therefore 1 6! 43! 6 5 4 3 2 1 = = × × × × × num ace pairs C 4! 50! 2! 49C6 49! 49 48 47 46 45 44 = 4 2 = × × × × × num pairs 52C2 2! 2! × 52! 1 = 4 3 1 13983816 = × = 52 51 221 × 141 142 Lottery Example 2 Matching only 3 balls, method 2:

What is the probability of winning £10 by matching ex- number of ways we can win actly 3 balls in the national lottery total possible number of outcomes Method 1: Thinking about all the balls in the lottery machine, we Work out the probability of matching them in a par- consider: ticular order: the first 3 balls that are drawn win, the remaining 3 do not. The number of ways the 6 5 4 43 42 41 The number of ways the lottery machine can pick lottery machine can pick 49 × 48 × 47 × 46 × 45 × 44 3 balls matching some 3 balls from the 43 balls Then multiply this by the number of possible ways of of the 6 numbers on our   not on our ticket. ticket.    picking the 3 winning balls among the 6 balls that are      The total number of ways of picking 6 drawn. balls out of the 49 in the machine. ✔✔✔✖✖✖   ✔✔✖✔✖✖  ✔✔✖✖✔✖  6C3 43C3 6! 43! 43! 6!  = =  6C3 = 20 ✔✔✖✖✖✔  49C6 49! 40! 3! 3! 3!  ✔✖✔✔✖✖ 43 42 41 6 5 4 6 5 4  = × × × × × × × × ... etc.   49 48 47 46 45 44 3 2  × × × × × × × 6 5 4 43 42 41 1 1 Hence: 6C3 = = 49 × 48 × 47 × 46 × 45 × 44 × 56.7 56.7

143 144 Section 9: Summary

P(A B) = P(A)+ P(B) if A and B are mutually ∪ exclusive outcomes.

P(A B) = P(A) P(B) provided A and B are ∩ × independent. Acknowledgements P(A B)= P(A B) P(B) ∩ | These notes are inspired by Prof Woodhouse’s notes P(A B)= P(A)+ P(B) P(A B) ∪ − ∩ for the same course and incorporate several sugges- tions from Drs Gee and Treece. I am very grateful to The number of different orders in which unique ob- n Martin Weber for checking the algebra in the exam- jects can be placed is ! n ples.

Permutations: = n! is the number of ways of nPr (n r)! choosing r items from n −when the order of the chosen items matters.

Combinations: = n! is the number of ways nCr (n r)!r! of choosing r items from n− when the order of the cho- sen items does not matter.

145 146