Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pitfalls of Probability

Similar presentations


Presentation on theme: "Pitfalls of Probability"— Presentation transcript:

1 Pitfalls of Probability
Great Theoretical Ideas In Computer Science Pitfalls of Probability Lecture 18 CS

2 You have 3 dice: Higher Number Wins
6 2 7 A 2 Players each rolls a die. The player with the higher number wins 5 1 9 B Which die is best to have – A, B, or C ? 4 3 8 C

3 A is better than B 6 2 7 5 1 9 When they are rolled, there are 9 equally likes outcomes 2 1 2 5 2 9 6 1 6 5 6 9 7 1 7 5 7 9 A beats B 5/9 of the time

4 B is better than C 5 1 9 4 3 8 When they are rolled, there are 9 equally likes outcomes 1 3 1 4 1 8 5 3 5 4 5 8 9 3 9 4 9 8 B beats C 5/9 of the time

5 A beats B with Prob. 5/9 B beats C with Prob. 5/9
QUESTION: Without explicitly doing the calculation, can you see the probability that A will beat C ? QUESTION: If you chose first, which die would you take? QUESTION: If you chose the second, which die would you take?

6 C is better than A! 6 2 7 4 3 8 When they are rolled, there are 9 equally likes outcomes 3 2 3 6 3 7 4 2 4 6 4 7 8 2 8 6 8 7 C beats A 5/9 of the time!

7 6 2 7 4 3 8 5 1 9

8 First Moral “Obvious” properties, such as transitivity, associativity, commutativity, etc… need to be rigorously argued because sometimes they are FALSE.

9 Second Moral When reasoning about probabilities…. Stay on your toes!

10 Third Moral To make money from a sucker in a bar, offer him the first choice of die. (allow him to change to your “lucky” die any time he wants)

11 Coming up next… More of the pitfalls of probability…

12 A single summary statistic (such as an average) may have several different possible explanations…

13 Thrust of article: Market forces are at work
US News & World Report 1983 # of doctors Average salary (1982 $) 1970 334,000 $103,900 1982 480,000 99,950 “Physicians are growing in number, but not in pay” Thrust of article: Market forces are at work Possibility: Doctors earn more than ever, but many old doctors have retired and been replaced with younger ones.

14 Name a body part that almost everyone on earth had an above average number of
Fingers Almost everyone has 10 More people are missing some than have extras (total fingers missing > # of extras) Average: 9.99 …

15 Almost everyone can be above average!

16 Rare Disease A person is selected at random and given a test for the rare disease “painanosufulitis” Only 1/10,000 people have it The test is 99% accurate: it gives the wrong answer (positive/negative) only 1% of the time The Person tests POSITIVE Does he have the disease? What is the probability that he has the disease?

17 At most k/10,000 have the disease
Suppose there are k people in the population At most k/10,000 have the disease But k/100 have false test results So  k/100 – k/10,000 have false test results but have no disease! That’s about 100 times more likely he got a false positive.

18 Several years ago Berkeley faced a law suit …
% of make applicants admitted to graduate school was 10% % of female applicants admitted to graduate school was 5% Grounds for discrimination? SUIT

19 Berkeley did a survey of its departments to find out which ones were at fault
The result was SHOCKING…

20 Every Department is more likely to admit a female than a male
#of males accepted to department X #of females accepted to department X > #of female applicants to department X #of male applicants to department X

21 How can this be ?

22 Answer Women tend to apply to departmebts that admit a smaller percentage of their applicants Women Men Department Applied Accepted A 99 4 1 B 10 TOTAL 100 5

23 Let’s assume 3) Males and females have the same distribution of academic success

24 1987 Department of Transportation requires that each month all airlines report their “on-time record” # of on-time flights landing at nation’s 30 busiest airports # of total flights into those airports

25 Newpapers would publish these data…
Meaningless junk!

26 Different airlines serve different airports with different frequency
An airline sending most of its planes into fair weather airports will crush an airline fling mostly into foggy airports It can even happen that an airline has a better record at each airport, but gets a worse overall rating by this method.

27 American West B) Alaska Airlines
% on time # flights LA 88.9 559 85.6 811 Phoenix 94.8 233 92.1 5255 San Diego 91.7 232 85.5 448 SF 83.1 605 71.3 449 Seattle 85.8 2146 76.7 262 OEVRALL 86.7 3775 89.1 7225 A beats B in each airport B has a better overall rating!

28 Computer Performance Analysis
SYSTEM Benchmark 6502 8080 Block 41.16 51.80 Sieve 63.17 48.08 SUM 104.33 99.58 Average 52.17 49.79 6502 as base 8080 Benchmark Block 1.00 1.25 0.80 Sieve 0.76 1.31 SUM 2.00 2.01 2.11 Average 1.01 1.06 Ratio of total: 6502 takes 4.7% more than 8080 6502 as base: 6502 takes 1% less than 8080 8080 as base: 6502 takes 6% more than 8080

29 Patterson and Sequin (1982)
Code Size on RISC-I vs. Z8002 RISC AS BASE Benchmark RISC Z8002 E-String Search 140 126 1.0 0.9 F-Bit Test 120 180 1.5 H-Linked List 176 141 0.8 K-Bit Matrix 288 374 1.3 I-Quick Sort 992 1091 1.1 Ackerman(3,6) 144 302 2.1 Recursive 2Sort 2736 1368 0.5 Puzzle-S 2796 1398 0.51 Puzzle-P 752 602 SED 17720 Hanoi Tower 96 240 2.5 SUM 25960 23542 11.0 13.0 Average 2360 2140 1.18

30 A Bridge Hand has 13 cards. What distribution of the 4 suits is most likely?
Examples: ? ? ? ?

31

32 You walk into a pet shop. There are two parrots in a cage.
Shop owner says “At least one of the two is male” What is the chance they are both male? FF FM /3 chance they are both MF male MM Shop owner says “The dark one is male” FM 1/2 chance they are both MF male MM

33 Oct 93. Press Release Crime Crisis in Florida
9 foreign tourists killed that year in the state of Florida Result: German’s Advise their citizens not to visit Florida All Indicative markings are removed from US. Rental Cars

34 Probability of  9 means in a given year
Suppose that each day there is a low probability p=1/365 of some foreign tourist dying somwhere in Florida (independent) (Thus, we get that the expected # of fatalities is 1 per year --- fairly low) Probability of  9 means in a given year Fairly low

35 Probability that in a given decade Florida will have a bloody year for foreign tourists:
1 - ( ) 10 = = 21% The killing could easily be random fluctuations, not sufficient evidence to damage their economy and scare people

36 A Voting Puzzle N (odd) people, each of whom has a random bit (50/50) on his/her forhead. No communication allowed. Each person goes to a private voting booth and casts a vote for either 1 or 0. If the outcome of the election coincided with the parity of the N bits, we say the voters “win” the election How do voters maximize the probability of winning?

37 Notice: Each individual has no information about the parity
Beware of the Fallacy! Since each individual is wrong half the time, the outcome of the election is wrong half the time Cf. [BG] Random Oracles PARITY – PR  PPR

38 Solution: NOTE – To know parity is equivalent to knowing the bit on your forehead
STRATEGY: Each person assumes the bit on his/her head is the same as the majority of bits sh/she sees. Vote accordingly (in the case of even split, vote 0). ANALYSIS: The strategy works so long as the number of 1’s is not exactly one more than the number of 0’s. Probability Of winning

39 Optimal Strategy IF N = 1 mod 4 Vote your Bit
N = 3 mod 4 Vote opposite Bit 50% + 1/O(N) chance of winning EX: N = 3 VOTE 1 Situations All 0’s 3 Single 1 Two 1’s Three 1’s Correct 6/8 = 75% of the time

40 0 | 0 1 | | The guy in the first packet assumes he has a zero on his forehead. He votes accordingly. If the other guys see that he indeed have a zero in his head, they assure his vote carries the election by splitting the vote in each packet.

41 0 | 0 1 | | The guys in the second packet assume the  of their two bits is zero. If they are correct, the guys in the later packets slit their votes..

42 In general, if the people in a packet see that some lower packet has a bit-wise  of 0, they slit their vote. Otherwise they assume their packet ’s to 0 and vote accordingly.

43 New Chicago Puzzle Each person has a private random bit Now, what is their chance of winning the election?

44 Voting in Chicago In Chicago people can vote as many times as they please Strategy: each person behaves as a packet Number the people from 1 to N. Person I votes 0 times if any lower number person has a 0 on his head. Otherwise person I assumes he has a 0 on his head and votes 2 times. Correct with probability 1/2N This is clearly optimal


Download ppt "Pitfalls of Probability"

Similar presentations


Ads by Google