10prob_10

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

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

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

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

View Full Document
ENGG1007 FCS 1. Player chooses An expensive sport car is hiding behind one of the y a door. 2. MC then opens one doors of the other two doors which does not have the car ehind behind layer will be asked 3. Player will be asked if he wants to switch his choice? If the player changes his choice, will he get a better chance to 2 get the sport car? What do you think?
ENGG1007 FCS robability Probability Sample space (S) – a set of possible outcomes; e.g. dice = {1, 2, 3, 4, 5, 6} vent (E) subset of sample space; e.g., small numbers ={1,2,3} 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} vent = { }; { } ) =|{ } | / |S| =1/52 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 3 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
ENGG1007 FCS robability 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 Solution 1 is correct because all its outcomes are equally likely Solution2: S be the set of 2-combinations with repetition, = +2- 2) = 21 qy y | S | C (6+2 1,2) 21 E = {{1,5}, {2,4}, {3,3}} So P ( E )= | E | / | S | = 3/21 = 1/7 4 P ( E ) = | E | / | S | with the assumption that all outcomes are equally likely.
ENGG1007 FCS robability on Cards Probability on Cards Example 1: Probability (a 5-card hand without a spade ace) (52 5) = 52x51x50x49x48 / 5! | S | = C(52,5) = 52x51x50x49x48 / 5! | E 1 | = C(51,5) = 51x50x49x48x47 / 5! P ( E ) = | E | / | S | = 47 / 52 1 1 Why counting the combinations work for this example? Are all “combinations” equally probable? “ es”- ecause each of the combinations can be obtained in Yes because each of the combinations can be obtained in equal number of ways = 5! ways . 5

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

View Full Document
ENGG1007 FCS Probability (a 5-card hand without a spade ace) Another approach (counting the number of permutations using the rule of roduct) product) # of permutations of a 5-card hand without a A = 51 x 50 x 49 x 48 x 47 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 52 x 51 x 50 x 49 x 48 Since all possible permutations are equally likely, e probability that all 5 cards are not 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 6
ENGG1007 FCS robability 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! =| /| = (48 5) C(525) P ( E 2 ) = | E 2 | / | S | = C(48,5) / C(52,5) = (48/52) (47/51) (46/50) (45/49) (44/48) = 0.658842 x 3: Probability (a 5- ard hand with two pairs) 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) 7

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

View Full Document
ENGG1007 FCS Let E be an event in a sample space S of equally ely outcomes The probability of the event c the likely outcomes. The probability of the event E , the complement of E, is given by P ( E c ) = 1 – P ( E ) Ex 5: Probability (a 5-card hand at least one ace) Recall
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/10/2011 for the course ENGG 1007 taught by Professor Unknown during the Spring '11 term at HKU.

### Page1 / 35

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

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

View Full Document
Ask a homework question - tutors are online