Professional Documents
Culture Documents
Probability Fun PDF
Probability Fun PDF
Ananda Dasgupta
IISER Kolkata
NGPE 2016
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
Ananda Dasgupta
Warden versus prisoners
A strategy is necessary
If every one opens the first 50 boxes, they are bound to fail.
Ananda Dasgupta
Warden versus prisoners
A strategy is necessary
If every one opens the first 50 boxes, they are bound to fail.
If each prisoner opens 50 boxes at random, their chance
increases.
Ananda Dasgupta
Warden versus prisoners
A strategy is necessary
If every one opens the first 50 boxes, they are bound to fail.
If each prisoner opens 50 boxes at random, their chance
increases.
There is a 50 % chance of each prisoner finding his box.
Ananda Dasgupta
Warden versus prisoners
A strategy is necessary
If every one opens the first 50 boxes, they are bound to fail.
If each prisoner opens 50 boxes at random, their chance
increases.
There is a 50 % chance of each prisoner finding his box.
100
1
The chance of everyone doing so is ≈ 10−30
2
Ananda Dasgupta
Warden versus prisoners
A strategy is necessary
If every one opens the first 50 boxes, they are bound to fail.
If each prisoner opens 50 boxes at random, their chance
increases.
There is a 50 % chance of each prisoner finding his box.
100
1
The chance of everyone doing so is ≈ 10−30
2
There is a strategy, though, that will give them over 30%
chance of success!
Ananda Dasgupta
The birthday problem
Ananda Dasgupta
The birthday problem
Guess: How large does the class have to be for the probability to
exceed 50%?
Ananda Dasgupta
The birthday problem
Guess: How large does the class have to be for the probability to
exceed 50%?
Ananda Dasgupta
The birthday problem
Ananda Dasgupta
The birthday problem
Ananda Dasgupta
The birthday problem
Let’s find the probability that all the N students have different
birthdays.
Ananda Dasgupta
The birthday problem
Let’s find the probability that all the N students have different
birthdays.
Ananda Dasgupta
The birthday problem
Let’s find the probability that all the N students have different
birthdays.
Ananda Dasgupta
The birthday problem
Let’s find the probability that all the N students have different
birthdays.
Ananda Dasgupta
The Birthday problem
1
2
10 20 30 40 50 N
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A fair toss ... with a biased coin!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
A matter of life and death ... literally!
The perils of random testing
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
tg
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
(tg , tb )
tg
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
(tg , tb )
tg
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
(tg , tb )
tb
=
tg
tg
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
(tg , tb )
5
+
tg
=
tb
10
+
tb
=
tg
tg
Ananda Dasgupta
The caféteria problem
Two friends decide to meet at the caféteria during a 30 minute
recess. If the girl arrives first, she will wait for five minutes for the
boy to arrive. If, on the other hand, the boy is the first to arrive,
he will wait for ten minutes. What is the probability that they will
meet?
tb
(tg , tb )
5
+
tg
=
tb
10
+
tb
=
tg
tg
Ananda Dasgupta
The caféteria problem
Python code
Ananda Dasgupta
The uniform variate
N = 100
0.1
Ananda Dasgupta
The uniform variate
N = 100000
0.1
Ananda Dasgupta
Distribution for y = x 2
N = 100
0.3
0.2
0.1
Ananda Dasgupta
Distribution for y = x 2
N = 100000
0.3
0.2
0.1
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
y + ∆y
y
x x + ∆x
x
For x 2 to lie between y and y + ∆y , x must lie between x and
x + ∆x
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
y + ∆y
y
x x + ∆x
x
√
For x 2 to lie between y and y + ∆y , x must lie between
√ y and
y + ∆y
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
y + ∆y
y
x x + ∆x
x
Probability of x 2 lying between y and y + ∆y is
p √
∆x = y + ∆y − y
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
y + ∆y
y
x x + ∆x
x
Probability of x 2 lying between y and y + ∆y is
p √ 1
∆x = y + ∆y − y ≈ √ ∆y
2 y
Ananda Dasgupta
Distribution for y = x 2
The theory:
y = x2
y + ∆y
y
x x + ∆x
1
P(y )dy = √ dy
2 y
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
y + ∆y
y
x x + ∆x
x
For f (x) to lie between y and y + ∆y , x must lie between x and
x + ∆x
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
y + ∆y
y
x x + ∆x
x
For f (x) to lie between y and y + ∆y , x must lie between f −1 (y )
and f −1 (y + ∆y )
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
y + ∆y
y
x x + ∆x
x
Probability of f (x) lying between y and y + ∆y is
∆x = f −1 (y + ∆y ) − f −1 (y )
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
y + ∆y
y
x x + ∆x
x
Probability of f (x) lying between y and y + ∆y is
df −1 (y )
∆x = f −1 (y + ∆y ) − f −1 (y ) ≈ ∆y
dy
Ananda Dasgupta
Distribution for f (x)
The theory:
y = f (x)
y + ∆y
y
x x + ∆x
1
P(y )dy = dy
f0
Ananda Dasgupta
A physics question
V (x)
A number of particles are released from rest with the same energy
E at random initial times. If a snapshot of the system is then
taken, how will they be distributed?
Ananda Dasgupta
A physics question
V (x)
V (x)
P Q R S Tx
Ananda Dasgupta
A physics question
V (x)
P Q R S Tx
V (x)
P Q R S Tx
1
P(x) = reflects the fact that it spends most of its time
v (x)T
close to the points P and T ...
Ananda Dasgupta
Warden versus prisoners
The solution
3 11 7 1
1 2 3 4
6 16 4 12
5 6 7 8
14 2 10 9
9 10 11 12
15 8 13 5
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
3
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
7
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
11
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
10
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
2
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
7
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
3
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
3
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
7
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
6
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
16
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9 10 11 12
5
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
16
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9 10 11 12
5
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
6
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
3
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
7
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
12
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
14
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9 10 11 12
8
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
14
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9 10 11 12
8
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
12
5 6 7 8
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
1 2 3 4
5 6 7 8
9
9 10 11 12
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
3 11 7 1
1 2 3 4
6 16 4 12
5 6 7 8
14 2 10 9
9 10 11 12
15 8 13 5
13 14 15 16
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Warden versus prisoners
The solution
Ananda Dasgupta
Probability is a serious matter!
Ananda Dasgupta
Probability is a serious matter!
Ananda Dasgupta