Set theory, Clasical Probability, and Combinatorics

Applications of Probability Theory
 The subject of probability can be traced back to the 17th
century when it arose out of the study of gambling
games.
 The range of applications extends beyond games into business
decisions, insurance, law, medical tests, and the social
sciences.
 The stock market, “the largest casino in the world,” cannot
do without it.
(More in ECS 455)
 The telephone network, call centers, and airline
companies with their randomly fluctuating loads could not
have been economically designed without probability theory.
1
Probability and Random Processes
ECS 315
Dr. Prapun Suksompong
[email protected]
Set Theory
Office Hours:
BKD 3601-7
Monday
14:40-16:00
Friday
14:00-16:00
2
Venn diagram
3
Venn diagram: Examples
4
Partition
5
Probability and Random Processes
ECS 315
Dr. Prapun Suksompong
[email protected]
Classical Probability
Office Hours:
BKD 3601-7
Monday
14:40-16:00
Friday
14:00-16:00
6
Example
 In drawing a card from a deck, there are 52 equally likely
outcomes, 13 of which are diamonds. This leads to a
probability of 13/52 or 1/4.
7
The word “dice”
 Historically, dice is the plural of die.
 In modern standard English, dice is used as both the
singular and the plural.
8
Example of 19th Century bone dice
“Advanced” dice
9
[ http://gmdice.com/ ]
Two dice: Simulation
[ http://www2.whidbey.net/ohmsmath/webwork/javascript/dice2rol.htm ]
10
Two dice
 Assume that the two dice are fair and independent.
 P[sum of the two dice = 5] = 4/36
11
Two dice
 Assume that the two dice are fair and independent.
12
Scandal of Arithmetic
Which is more likely, obtaining at least one
six in 4 tosses of a fair die (event A), or
obtaining at least one double six in 24 tosses
of a pair of dice (event B)?
[http://www.youtube.com/watch?v=MrVD4q1m1Vo]
13
Scandal of Arithmetic
Which is more likely, obtaining at least one
six in 4 tosses of a fair die (event A), or
obtaining at least one double six in 24 tosses
of a pair of dice (event B)?
4
5
P( A)  1     .518
6
24
 35 
P( B)  1     .491
 36 
14
“Origin” of Probability Theory
 Probability theory was originally inspired by gambling




15
problems.
In 1654, Chevalier de Mere invented a gambling system
which bet even money on case B on the previous slide.
When he began losing money, he asked his mathematician
friend Blaise Pascal to analyze his gambling system.
Pascal discovered that the Chevalier's system would lose
about 51 percent of the time.
Pascal became so interested in probability and together with
another famous mathematician, Pierre de Fermat, they laid
the foundation of probability theory.
best known for Fermat's Last Theorem
Probability and Random Processes
ECS 315
Dr. Prapun Suksompong
[email protected]
Combinatorics
Office Hours:
BKD 3601-7
Monday
14:40-16:00
Friday
14:00-16:00
16
Finger-Smudge on Touch-Screen
Devices
 Fingers’ oily smear on the
screen
 Different apps gives different
finger-smudges.
 Latent smudges may be usable
to infer recently and frequently
touched areas of the screen--a
form of information
leakage.
[http://www.ijsmblog.com/2011/02/ipad-finger-smudge-art.html]
17
Lockscreen PIN / Passcode
18
[http://lifehacker.com/5813533/why-you-should-repeat-one-digit-in-your-phones-4+digit-lockscreen-pin]
Smudge Attack
 Touchscreen smudge may give away your password/passcode
 Four distinct fingerprints reveals the four numbers used for
passcode lock.
19
[http://www.engadget.com/2010/08/16/shocker-touchscreen-smudge-may-give-away-your-android-password/2]
Suggestion: Repeat One Digit
 Unknown numbers:
 The number of 4-digit different passcodes = 104
 Exactly four different numbers:
 The number of 4-digit different passcodes = 24
 Exactly three different numbers:
 The number of 4-digit different passcodes = 36
20
The Birthday Problem (paradox)
 How many people do you need to assemble before the
probability is greater than 1/2 that some two of them have
the same birthday (month and day)?
 Birthdays consist of a month and a day with no year attached.
 Ignore February 29 which only comes in leap years
 Assume that every day is as likely as any other to be someone’s
birthday
 In a group of r people, what is the probability that two or
more people have the same birthday?
21
Probability of birthday coincidence
 Probability that there is at least two people who have the
same birthday in a group of r persons
if r  365
1,


 
   365 364 365   r  1 
, if 0  r  365
1   365·365· ·

365

 
r terms


22
Probability of birthday coincidence
23
Zoom in…
1
0.9
0.8
0.7
0.6
0.6
0.5
0.58
0.56
0.4
0.54
0.3
0.52
0.2
0.5
0.48
0.1
0.46
0
5
10
15
20
25
30
35
400.44
45
50
55
0.42
21
24
22
23
24
25
26
Triangular number
 A triangular number or triangle number is the number of
dots in an equilateral triangle uniformly filled with dots.
Tn  1  2  3 
 (n  1)  n
n(n  1)  n  1



2
2


“Proof w/o Words”
25
Sums of Squares
26
Sums of Cubes
 The sum of the first n cubes is the square of the nth triangular
number.
n
n
2
i

(
i
)
 
3
 Visual Proof:
i 1
i 1
n3 = n copies of an n-by-n square
27
The Birthday Problem (con’t)
 With 88 people, the probability is greater than 1/2 of having
three people with the same birthday.
 187 people gives a probability greater than1/2 of four people
having the same birthday
28
Birthday Coincidence: 2nd Version
 How many people do you need to assemble before the
probability is greater than 1/2 that at least one of them have
the same birthday (month and day) as you?
 In a group of r people, what is the probability that at least one
of them have the same birthday (month and day) as you?
29
Binomial Theorem
( x1  y1 )  ( x2  y2 )
 x1 x2  x1 y2  y1 x2  y1 y2
( x1  y1 )  ( x2  y2 )  ( x3  y3 )
 x1 x2 x3  x1 x2 y3  x1 y2 x3  x1 y2 y3  y1x2 x3  y1x2 y3  y1 y2 x3  y1 y2 y3
x1  x2  x3  x
y1  y2  y3  y
( x  y)  ( x  y)
 xx  xy  yx  yy  x 2  2 xy  y 2
( x  y)  ( x  y)  ( x  y)
 xxx  xxy  xyx  xyy  yxx  yxy  yyx  yyy
30
 x3  3x 2 y  3xy 2  y 3
Distinct Passcodes (revisit)
 Unknown numbers:
 The number of 4-digit different passcodes = 104
 Exactly four different numbers:
 The number of 4-digit different passcodes = 4! = 24
 Exactly three different numbers:
 The number of 4-digit different passcodes = 3   4 2  36
 Exactly two different numbers:
 The number of 4-digit different passcodes =
 Exactly one number:
 The number of 4-digit different passcodes = 1
 Check:
31
Example: The Seven Card Hustle
 Take five red cards and two black cards from a pack.
 Ask your friend to shuffle them and then, without looking at the
faces, lay them out in a row.
 Bet that them can’t turn over three red cards.
 The probability that they CAN do it is
5  43 2

76 5 7
32
 5
 3
1
2
   5!  3! 4!  5  4  3 

765 7
 7  3! 2! 7!
 3
 
[Lovell, 2006]
[Greenes, 1977]
Example: Sock It Two Me
 Jack is so busy that he's always throwing his socks into his top
drawer without pairing them. One morning Jack oversleeps.
In his haste to get ready for school, (and still a bit sleepy), he
reaches into his drawer and pulls out 2 socks.
 Jack knows that 4 blue socks, 3 green socks, and 2 tan socks
are in his drawer.
1. What are Jack's chances that he pulls out 2 blue socks to match
his blue slacks?
2. What are the chances that he pulls out a pair of matching
socks?
33
Example: Sock It Two Me (2)
 Jack knows that 4 blue socks, 3 green socks, and 2 tan socks
are in his drawer. He reaches into his drawer and pulls out 2
socks.
1. What are Jack's chances that he pulls out 2 blue socks to
match his blue slacks? 4  3 1
98

6
2. What are the chances that he pulls out a pair of matching
socks?
34
4  3  3  2  2 1 5

98
18
Need more practice?
[ http://en.wikipedia.org/wiki/Poker_probability ]
Ex: Poker Probability
35
Watch Mlodinow’s talk
 Delivered to Google employees
 About his book (“The Drunkard's Walk”)
 http://www.youtube.com/watch?v=F0sLuRsu1Do
36
Exercise
 At 10:14 into the video, Mlodinow shows three probabilities.
 Can you derive the first two?
 [Mlodinow, 2008, p. 180-181]
37