Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
a useful result.
We can use these results to solve an interesting number
theory problem. 4
PILLAI
Example 2.1 Two integers M and N are chosen at random.
What is the probability that they are relatively prime to
each other?
Solution: Since M and N are chosen at random, whether
p divides M or not does not depend on the other number N.
Thus we have
P{" p divides both M and N"}
1
P{" p divides M "} P{" p divides N "} 2
p
where we have used (1-4). Also from (1-10)
P{" p does not divede both M and N "}
1
1 P{" p divides both M and N "} 1 2
p
Observe that “M and N are relatively prime” if and only 5if
there exists no prime p that divides both M and N. PILLAI
Hence
" M and N are relatively prime" X 2 X 3 X 5
where Xp represents the event
X p " p divides both M and N ".
Hence using (2-2) and (2-5)
P{" M and N are relatively prime"} P( X p )
p prime
1 1 6
(1 1)
p2
2 2 0.6079,
/6
p prime
1/ k 2
k 1
1 1 6
2 2.
/6
1/ k 2
7
k 1 PILLAI
Note: To add an interesting twist to the ‘square free’ number
problem, Ramanujan has shown through elementary but
clever arguments that the inverses of the nth powers of all
‘square free’ numbers add to Sn / S2 n , where (see (2-E))
Sn 1/ k n .
k 1
Fig.2.1
P( R | A1 ) P ( A1 ) ( 2 p p 2 )(1 p ) 2 2 p p 2 (2-11)
P( A1 | R ) .
P( R ) 3p 3p p
2 3
3p 3p p
2 3
11
PILLAI
Repeated Trials
Consider two independent experiments with associated
probability models (1, F1, P1) and (2, F2, P2). Let
1, 2 represent elementary events. A joint
performance of the two experiments produces an
elementary events = (, ). How to characterize an
appropriate probability to this “combined event” ?
Towards this, consider the Cartesian product space
= 1 2 generated from 1 and 2 such that if
1 and 2 , then every in is an ordered pair of
the form = (, ). To arrive at a probability model we
need to define the combined trio (, F, P).
12
PILLAI
Suppose AF1 and B F2. Then A B is the set of all pairs
(, ), where A and B. Any such subset of
appears to be a legitimate event for the combined
experiment. Let F denote the field composed of all such
subsets A B together with their unions and compliments.
In this combined experiment, the probabilities of the events
A 2 and 1 B are such that
P( A 2 ) P1 ( A), P(1 B ) P2 ( B ). (2-12)
nk A.
Using (2-17), the probability of occurrence of such an is
given by
P0 ( ) P({ i1 ,i2 ,,ik ,,in }) P({ i1 }) P({ i2 }) P({ ik }) P({ in })
P( A) P( A) P( A) P( A) P( A) P( A) p k q n k . (2-19)
k n k
However the k occurrences of A can occur in any particular
location inside . Let represent all such
1 , 2 ,, N
events in which A occurs exactly k times. Then
16
PILLAI
Thus
P (" A occurs exactly k times in n trials" )
N
P0 (i ) NP0 ( ) Np k q n k , (2-21)
i 1
"success" A { either 3 or 4 } f 3 f 4 .
Thus
1 1 1
P ( A) P ( f 3 ) P ( f 4 ) ,
6 6 3
and the desired probability is given by (2-23) with n 8 , k 5
and p 1 / 3. Notice that this is similar to a “biased coin”19
problem. PILLAI
Bernoulli trial: consists of repeated independent and
identical experiments each of which has only two outcomes A
or A with P( A) p, and P( A) q. The probability of exactly
k occurrences of A in n such trials is given by (2-23).
Let
X k " exactly k occurrences in n trials" . (2-24)
k
Fig. 2.2 21
PILLAI
Pn ( k 1) n! p k 1q n k 1 ( n k )! k! k q
k n k
. (2-28)
Pn ( k ) ( n k 1)! ( k 1)! n! p q n k 1 p
Thus Pn ( k ) Pn ( k 1), if k (1 p ) ( n k 1) p or k ( n 1) p.
Thus Pn (k ) as a function of k increases until
k ( n 1) p (2-29)
np ( p q) n 1 np. (2-36)
Proceeding in a similar manner, it can be shown that
n n n
n! n!
k 0
k2
Pn ( k )
k 1
k
( n k )! ( k 1)!
p k n k
q
k 2 ( n k )! ( k 2 )!
p k q n k
n
n!
p k q n k n 2 p 2 npq. (2-37)
k 1 ( n k )! ( k 1)!
26
PILLAI
Returning to (2-35), note that
k
p is equivalent to ( k np )2 n 2 2 , (2-38)
n
which in turn is equivalent to
n n
(
k 0
k np ) Pn ( k2
) n
2 2
Pn ( k ) n
k 0
.
2 2
(2-39)
(k np )
k 0
2
Pn ( k ) k Pn ( k ) 2np k Pn ( k ) n 2 p 2
k 0
2
k 0
(k np ) P (k )
k np n
2
n n 2 2 P (k )
k np n
n
(2-41) 27
n P k np n .
2 2
PILLAI
Using (2-40) in (2-41), we get the desired result
k pq
P
n p
. (2-42)
n 2
Let us assume that the two dice are slightly loaded in such
a manner so that the faces 1, 2 and 3 appear with probability
1 and faces 4, 5 and 6 appear with probability
6
1 , 0 for each dice. If T represents the combined
6
total for the two dice (following Text notation), we get 33
PILLAI
p4 P{T 4} P{(1,3),(2, 2),(1,3)} 3( 16 ) 2
1 2 ) 2( 1 ) 2
p5 P{T 5} P{(1, 4),(2,3),(3, 2),(4,1)} 2( 36 6
1 2 ) ( 1 )2
p6 P{T 6} P{(1,5),(2, 4),(3,3),(4, 2),(5,1)} 4( 36 6
1 2)
p7 P{T 7} P{(1,6),(2,5),(3, 4),(4,3),(5, 2),(6,1)} 6( 36
1 2 ) ( 1 )2
p8 P{T 8} P{(2,6),(3,5),(4, 4),(5,3),(6, 2)} 4( 36 6
1 2 ) 2( 1 ) 2
p9 P{T 9} P{(3,6),(4,5),(5, 4),(6,3)} 2( 36 6
p10 P{T 10} P{(4,6),(5,5),(6, 4)} 3( 16 ) 2
p11 P{T 11} P{(5,6),(6,5)} 2( 16 ) 2 .
(Note that “(1,3)” above represents the event “the first dice
shows face 1, and the second dice shows face 3” etc.)
For 0.01, we get the following Table:
34
PILLAI
T=k 4 5 6 7 8 9 10 11
pk = P{T = k} 0.0706 0.1044 0.1353 0.1661 0.1419 0.1178 0.0936 0.0624
Thus
P{winning the game} P1 P2 0.5002 (2-49)
Although perfect dice gives rise to an unfavorable game,
35
PILLAI
a slight loading of the dice turns the fortunes around in
favor of the player! (Not an exciting conclusion as far as
the casinos are concerned).
Even if we let the two dice to have different loading
factors 1 and 2 (for the situation described above), similar
conclusions do follow. For example, 1 0.01 and 2 0.005
gives (show this)
P{winning the game} 0.5015. (2-50)
Once again the game is in favor of the player!
37
PILLAI
Appendix: Euler’s Identity
S. Ramanujan in one of his early papers (J. of Indian
Math Soc; V, 1913) starts with the clever observation that
if a2 , a3 , a5 , a7 , a11 , are numbers less than unity where
the subscripts 2,3,5,7,11, are the series of prime
numbers, then1
1 1 1 1
1 a2 a3 a2 a2 a5
1 a2 1 a3 1 a5 1 a7
a2 a3 a7 a2 a2 a2 a3 a3 . (2-A)
Notice that the terms in (2-A) are arranged in such a way
that the product obtained by multiplying the subscripts are
the series of all natural numbers 2,3, 4,5,6,7,8,9,. Clearly,
(2-A) follows by observing that the natural numbers
38
1
The relation (2-A) is ancient.
PILLAI
are formed by multiplying primes and their powers.
Ramanujan uses (2-A) to derive a variety of
interesting identities including the Euler’s identity that
follows by letting a2 1/ 2 s , a3 1/ 3s , a5 1/ 5s , in
(2-A). This gives the Euler identity
(1 p1s ) 1/ n s .
1
(2-B)
p prime n 1
2(2n )! 1 1 1 1
2n 2n
2n 2n 2n
(2 ) 1 2 3 4
which gives
(2 ) Bn
2n
S2 n 1/ k
2n (2-E)
k 1 2(2n )!
Thus 1
2
4
1/ k 2
6
; 1/ k 4
90
etc.
k 1 k 1
1
The series 1/ k 2 can be summed using the Fourier series expansion of a periodic ramp 40
k 1
signal as well. PILLAI