{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

10prob_10

# 10prob_10 - ENGG1007 Foundations of Computer Science...

This preview shows pages 1–9. Sign up to view the full content.

1 ENGG1007 Foundations of Computer Science Probability Probability Professor Francis Chin, Dr SM Yiu Text book - Chapter 6

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 ENGG1007 FCS An expensive sport car is hiding behind one of the doors 1. Player chooses a door. 1. MC then opens one of the other two doors which does not have the car behind 1. Player will be asked if he wants to switch his choice? If the player changes his choice, will he get a better chance to get the sport car? What do you think?
3 ENGG1007 FCS Probability Probability Sample space (S) – a set of possible outcomes; e.g. dice = {1, 2, 3, 4, 5, 6} Event (E) – a subset of sample space; e.g., small numbers = {1, 2, 3} If all outcomes are equally likely , probability of an event E , P ( E ) = | E | / | S | Sample space S = { ♠, ♥, ♦ , ♣ } x {A, 2, 3, 4, 5, 6 7, 8, 9, T, J, Q, K} Event = { 9 }; P ( { 9} ) = | { 9} | / |S| = 1 / 52 Event = a card of heart = { A, 1, 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K } = P ( a card of heart ) = 13 / 52 Event = a red card ; P ( a red card ) = 26 / 52

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 ENGG1007 FCS Probability Probability Example: Probability when the sum of 2 rolled fair dice is 6 Solution1: | S | = 6 2 = 36 outcomes E = {(1,5 ) , (2,4), (3,3), (4,2), (5,1)} P ( E ) = | E | / | S | = 5/36 Solution2: S be the set of 2-combinations with repetition, | S | = C (6+2-1,2) = 21 E = {{1,5}, {2,4}, {3,3}} So P ( E ) = | E | / | S | = 3/21 = 1/7 P ( E ) = | E | / | S | with the assumption that all outcomes are equally likely. Solution 1 is correct because all its outcomes are equally likely
5 ENGG1007 FCS Probability on Cards Probability on Cards Example 1: Probability (a 5-card hand without a spade ace) | S | = C(52,5) = 52x51x50x49x48 / 5! | E 1 | = C(51,5) = 51x50x49x48x47 / 5! P ( E 1 ) = | E 1 | / | S | = 47 / 52 Why counting the combinations work for this example? Are all “combinations” equally probable? “Yes” - because each of the combinations can be obtained in equal number of ways = 5! ways .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 ENGG1007 FCS Probability (a 5-card hand without a spade ace) Another approach (counting the number of permutations using the rule of product) # of permutations of a 5-card hand without a ♠A = 51 x 50 x 49 x 48 x 47 Total number of permutations of a 5-card hand = 52 x 51 x 50 x 49 x 48 Since all possible permutations are equally likely, the probability that all 5 cards are not ♠A = (51 x 50 x 49 x 48 x 47)/ (52 x 51 x 50 x 49 x 48) = 47 / 52
7 ENGG1007 FCS Probability on cards Probability on cards Ex 2: Probability (a 5-card hand without any ace) | E 2 | = C(48,5) = 48x47x46x45x44 / 5! | S | = C(52,5) = 52x51x50x49x48 / 5! P ( E 2 ) = | E 2 | / | S | = C(48,5) / C(52,5) = (48/52) (47/51) (46/50) (45/49) (44/48) = 0.658842 Ex 3: Probability (a 5-card hand with two pairs) | E 3 | = C(13,2) C(4,2) C(4,2) C(44,1) Ex 4: Probability (a 5-card hand with one pair) | E 4 | = C(13,1) C(4,2) C(12,3) C(4,1) C(4,1) C(4,1)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 ENGG1007 FCS Ex 5: Probability (a 5-card hand at least one ace)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 35

10prob_10 - ENGG1007 Foundations of Computer Science...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online