Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
P a g e | 13
CHAPTER 2
Basic Concepts from Probability Theory
2.1 Introduction
2.2 Random events and probability
2.3 Counting techniques and calculation of probabilities
2.4 The conditional probability, independence and Bayes rule
2.5 Random variables and distribution functions
2.6 Moments and Moment generating functions
2.7 Chapter summary
2.8 Computer examples
Projects for Chapter 2
P a g e | 14
Exercises 2.2
2.2.1
(a)
S {( R, R, R), ( R, R, L), ( R, L, R), ( L, R, R), ( R, L, L), ( L, R, L), ( L, L, R), ( L, L, L)}
(b)
P
7
8
(c)
P
4
8
(d)
P
3
8
(e)
P
2
8
2.2.3
Side of
dice
1
2
3
4
5
6
1
2
3
4
5
6
2
3
4
5
6
7
3
4
5
6
7
8
4
5
6
7
8
9
5
6
7
8
9
10
6
7
8
9
10
11
7
8
9
10
11
12
(a)
P
5
36
(b)
P
1
4
(c) P
2
9
(d)
P
1
2
2.2.5
P(A B) H , H , H , T , T , H
P a g e | 15
2.2.7
(a)
Probability space is
S {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6),
(3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6),
(5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5), (6,6)}
(b)
P
6
36
(c)
P
1
36
2.2.9
(a)
Probability space is
S {N, N, N, S, S}
N stands for normal and S stands for spoiled.
(b)
3 2 6
P
5 4 20
(c)
3 2
2 3
P 2 .9
5 4
5 4
2.2.11
P p 2q
2.2.13
(a)
Since A B then let A AC B , we know P(A) P(A c ) P( B) by the axiom 3.
Since P(A c ) 0 by axiom 1 we know P(A) P(A c ) P(A) then P(A) P(B) .
(b)
Let
C A B , A Aa C
and
B B a C , by axiom 3 we know
P( A B) P( Aa ) P( B a ) P(C ) .
Since P(A) P( Aa ) P(C ) and P(B) P( B a ) P(C ) by axiom 3 again, we know
P a g e | 16
P( Aa ) P(A) - P(C ) and P( B a ) P(B) - P(C ) . Plug them back in previous equation
P( A B) P( Aa ) P( B a ) P(C )
and
we
get
the
following
P( A B) P( A) P( B) - P(C ) P( A) P( B) - P(A B) . If A B
equation
then by
axiom 1 we know P(A B) 0 and just plug in we complete the proof.
2.2.15
(a) From 2.2.13 we know P(A B) P(A) P( B) - P(A B) and from axiom 2 we know
P(A B) 1 , we can see that P(A) P( B) - P(A B) 1 and that complete the proof
P(A) P( B) - 1 P(A B) .
(b) From 2.2.13 we know P(A1 A2 ) P(A1 ) P(A2 ) - P(A1 A2 ) . From axiom 1 we
know P(A1 A2 ) 0 it means P(A1 A2 ) 0 and we can get the following
inequality P(A1 A2 ) P(A1 ) P(A2 ) - P(A1 A2 ) P(A1 ) P(A2 ) .
2.2.17
(a)
P A B P A P B P A B .24 .67 .09 .82
(b)
P A B
C
1 P A B 1 0.82 0.18
(c)
P( Ac Bc ) P(( A B)c ) 1 P( A B) 1 .09 .91
(d)
P(( A B)c ) 1 P( A B) 1 .09 .91
(e)
P Ac Bc P A B 1 P A B 1 0.82 .18
c
2.2.19
(i)
P( B )
250 150 150
.55
1000
P a g e | 17
(ii)
P( Ac B )
150 150
.3
1000
(iii)
P( A B c )
150 250 50 250
.7
1000
2.2.21
(i) Let R represent a red fly and B represent a blue fly: (ie. RR represents removing two red
flies)
3 2 2 1 8
P(A) P( RR BB) P( RR) P( BB)
.4
5 4 5 4 20
(ii)
3 2 2 3 3 2 18
P( B) P( RB BR RR) P( RB) P( BR) P( RR)
.9
5 4 5 4 5 4 20
(iii)
(Sample Space) S {RR, BB, RB, BR}
A {RR, BB} , B {RB, BR, RR}
A B {RR, BB, RB, BR}
Since A B S , P( A B) P(S) 1
or
P( A B) P( A) P( B) P( A B)
P( RR) P( BB) P( BR) P ( RB) P ( RR) P(RR)
3 2 2 1 2 3 3 2 20
P( RR) P( BB) P( BR) P ( RB)
1
5 4 5 4 5 4 5 4 20
(iv)
(Sample Space) S {RR, BB, RB, BR}
A {RR, BB} , B {RB, BR, RR}
A B {RR}
3 2 6
P( A B)
.3
5 4 20
or
P( A B ) P ( A) P( B) P( A B )
P( A B ) P ( A) P( B) P( A B )
P( A) P( B) P( A B) P( RR) P( BB) P( RB) P( BR) P(RR) P(RR) P(BB) P( RB) P( B
P( A) P( B) P( A B) P(RR)
P ( A B ) P(RR)
3 2 6
P( A B)
.3
5 4 20
P a g e | 18
2.2.23
Without loss of generality let us assume A n is increasing sequence then
A1 A 2 ... A n ... . We know that if A1 A 2 ... A n ... then
A1 A 2 ... A n ... A i lim n A n .
From
the
condition
we
know
both
sides
then
i 1
lim n A n Ai
and
if
we
take
probability
on
i 1
lim n P(A n ) P(Ai ) P(lim n An )
i 1
Exercises 2.3
2.3.1
(i)
10
10!
10! 10 9
45
2!
2 (10 2)!2! 8!2!
(ii)
10
10!
10!
1
0 (10 0)!0! 10!
(iii)
10
10!
10!
10
9 (10 9)!9! 9!
(iv)
10 10
10!
10!
10! 10! 10 9 10 9 8
45 120 5400
2!
3!
2 3 (10 2)!2! (10 3)!3! 8!2! 7!3!
(v)
10
10!
10 9 8 7 6
2520
12
2 3 5 2!3!5!
2.3.3
N k 210 1024
P a g e | 19
2.3.5
25
25!
25! 25 24 23 22 21
53130
5!
20 (25 20)!20! 5!20!
2.3.7
30
30!
30!
155117520
15 (30 15)!15! 15!15!
2.3.9
40
40
4
4!
43
40
31
2 (4 2)!2! 2! 6 1.337 10
40
2.3.11
(a)
P(all 5 customer getting 1 defective component)=
45 5
5
5
9 9 9 9 9 1 1 1 1 1 5!45! 10! 5!45!10 .0472
5
50
50!
9! 50!
10 10 10 10 10
(b)
P(one customer getting all 5 defective components)
45 5
5 5 45! 40!10! .0001189
40!5! 50!
50
10
(c)
P(two customers receive two defective components each, two none and the other one)
45
5
8 8 9 10 10 2 2 1 0
50
10 10 10 10 10
0
2.3.13
12 15
12 15 180
1 1
10! 45!10!10!10!5! .009557
5!45!
4 8!8!9!10!10! 50!
4 50!9!8!8!
5
P a g e | 20
2.3.15
(a)
P( A) 1
365 364 ...(365 20 1)
.4114
36520
(b)
P( A) 1
365 364 ...(365 30 1)
.7063
36530
(c)
When n=23 we have P( A) 1
365 364 ...(365 23 1)
.5073
36523
2.3.17
P(opposite color at ends )
5 4 4 5 40
.5556
9 8 9 8 72
2.3.19
(a) 65 7776
(b) P1352
52!
52!
3.95 1021
52
13
!
39!
(c)
52
52!
5.36 1028
13
13
13
13
13!13!13!13!
(d)
72
72!
3.02 1012
11 61!11!
2.3.21
The question is asking when the cell does the splitting to produce a child. There will be a
cell with half of the chromosomes. According to this understanding we have
(a) 223 8388608
23 1
817190
23
.097417
8388608
9 2
(b)
P a g e | 21
Exercises 2.4
2.4.1
(a)
P(at least one relay being close)
1 P(none of the relays closing)
1 (.1 .1 .1)
1 .001 .999
(b)
P(1st relay closed|at least one relay closed)
.9
.9009
.999
2.4.3
(a)
P(A | B) P(A c | B)
P(A B) P(A c B) P(B | A) P(A) P(B | Ac ) P(A c ) P(B)
1
P(B)
P(B)
P(B)
P(B)
(b)
(i) if P(A | B) P(A | Bc ) 1 then we know P(A | Bc ) 1 P(A | B) P(A c | B) that means A
and B are symmetric in probability. But it is not always true.
(ii) if P(A | B) P(A c | Bc ) 1 then we know P(A c | Bc ) 1 P(A | B) P(A c | B)
That means B and Bc ’s conditional probability are same, which is same as A and B are
independent. But that is not always true.
2.4.5
If A and B are independent then P(A B) P(A) P(B)
(i) P(A c B) P(B) - P(A B) P(B) - P(A) P(B) (1 - P(A))(P(B) ) P(A c ) P(B)
we know Ac and B are independent.
(ii) According to (i) just switch A and B and we can prove it.
(iii)
P(A c Bc ) P(Bc ) - P(A Bc ) P(Bc ) - P(A) P(Bc ) (1 - P(A))(P(B c )) P(A c ) P(Bc )
2.4.7
1
P( E F ) 54 1
4
P( E | F )
therefore E and F are independent
13 13 54
P(F)
54
then
P a g e | 22
2.4.9
12 10
0 2
45
P(selecting 2 girls)
.1948
231
22
2
2.4.11
(a) Let C=colorblind, M=male, and F=female
P(C ) P( M ) P(C | M ) P( F ) P(C | F )
.45(.06) .55(.075)
.027 .004125
.031125
(b) P(C | M ) .06
2.4.13
Let D=disease, H=healthy, p=positive, Want to find P(D|p)
P(p) P(D) P(p | D) P(H) P(p | H) .02(.98) .98(.005) .0245
P( D | p )
P( D ) P( p | D ) .02(.98) .0196
.8
P( p )
.0245
.0245
2.4.15
(a)
12
P(a dime is selected) P(a dime is selected | box i is selected) P(box i is selected )
i 2
12
i
P( the sum of dies i )
i 2 12
2(1) 3(2) 4(3) 5(4) 6(5) 7(6) 8(5) 9(4) 10(3) 11(2) 12(1)
12(36)
.583333
(b)
P(box 4 is selected | a penny is selected)
P(box 4 is selected & a penny is selected)
(3 / 36)(8 / 12)
.13333
P(a penny is selected)
1 P(a dime is selected )
2.4.17
1st girl stand for 1st person drawn was a girl
1st boy stand for 1st person drawn was a boy
2nd boy stand for 2nd person drawn was a boy
P a g e | 23
P(2nd boy ) P(2nd boy |1st boy ) P(1st boy ) P(2nd boy |1st girl) P(1st girl)
11 13 10 12
16 25 16 25
.6575
2.4.19
P(W ) P(W | Urn1) P(Urn1) P(W | Urn 2) P(Urn 2)
5 1 4 1
.5125
8 2 10 2
1 5
P(W | Urn1) P(Urn1) 2 8 .3125
P(Urn1 | W )
.60976
P(W )
.5125 .5125
2.4.21
(a) P(Accident rate) .25 .086 .257 .044 .347 .056 .146 .098 .066548
(b) P(gourp 4|Accident)
.146 .098
.215
.0665
2.4.23
P( D) P( D | S1) P( S1) P( D | S 2) P( S 2)
.1 .6 .03 .4 .072
P(D | S2) P(S2)
P(D)
.03 .4 .012
.1667
.072
.072
P(S2 | D)
2.4.25
Let A, B, and C stand for component A, B, and C working properly
Let Ac, Bc, Cc stand for component A, B, and C not working
P(circuit working) P(at least 2 components working properly)
P(A B C) P(A c B C) P(A Bc C) P(A B Cc )
P(A) P(B C) P(A c ) P(B C) P(A) P(Bc C) P(A) P(B Cc )
P(A) P(B | C) P(C) P(A c ) P(B | C) P(C) P(A) P(Bc | C) P(C) P(A) P(B | Cc ) P(C)
.85(.9)(.95) .15(.9)(.95) .85(.1)(.95) .85(.25)(.05)
.72675 .031875 .08075 .010625 .85
P a g e | 24
2.4.27
(a) subscript 1 and 2 stand for 1st and 2nd selected student
P(same blood type)=
P(O2 | O1 ) P(O1 ) P(A 2 | A1 ) P(A1 ) P(B2 | B1 ) P(B1 ) P(AB2 | AB1 ) P(AB1 )
17 18 15 16 3 4
1 2
39 40 39 40 39 40 39 40
560
.35897
1560
18 4
P(O2 B1 ) 39 40 18
(b) P(O2 | B1 )
.46154
4
P( B1 )
39
40
2.4.29
Let E denote A ends up with all the money when he starts with i.
Let F denote A ends up with all the money when he starts with N-i. For A starts with N-i
means B starts with i because N is the total money A and B has so if we got P(E) then
P(F)=1-P(E).
Let H denote the event that the first flip lands heads and p denote the probability to have H on
the first flip.
P(E) P( E | H ) P( H ) P( E | H C ) P( H C )
This probability represents that A gets a head and combined with the probability if B win the
first coin.
Now we let P(E) P( E | H )p P( E | H C )(1 p) Pi and define this as the first round.
New, given that the first flip lands heads, the situation after the first bet is that A has i+1 units
and B has N-(i+1) units.
Since the successive flips are assumed to be independent with a common probability p of
heads, it follows that, from that point on, A’s probability of winning all the money is exactly
the same as if the game were just starting with A having an initial fortune of i+1 and B having
an initial fortune of N-(i+1)
Therefore, P( E | H ) Pi1 and P( E | H C ) Pi1 . Let q to be 1-p,
Pi pPi1 qPi1
i=1, 2, …, N-1
By applying the condition that P0 0 and PN 1
Pi 1Pi ( p q)Pi pPi1 qPi1
P a g e | 25
q
i=1, 2, …, N-1
(Pi Pi1 )
p
After plug in i
We got
q
q
P2 - P1 (P1 P0 ) P1
p
p
q
q
P3 - P2 (P2 P1 ) ( ) 2 P1
p
p
q
q
PN - PN 1 (PN 1 PN 2 ) ( ) N-1 P1
p
p
Pi1 - Pi
If
q
1
p
Then P2 - P1 P1 and P2 2P1
P3 3P1
PN NP1
PN 1
Which means P1
Therefore Pi
1
N
i
N
N
q N 1
q q
1-
-
q
If
<1 , then PN -P1 1-P1 P1 q p P1 ( p p )
p
q
p 1- q
1
p
p
q q N
q N
-
1-
p p
p
1 P1
1 P1
q
q
1
1p
p
q
1p
P1
N
1- q
p
Add all equations, we got
N 1
q q 2
q
PN -P1 P1 ...
p p
p
P a g e | 26
Add first i-1 of all equations, we got
q i 1
i 1
q q 2
q
q 1- p
Pi -P1 P1 ... P1
p p
p 1- q
p
p
q q i q i
1- 1- 1-
Pi p N pq p N
1- q 1- p 1- q
p
p
Then if we start with N-i, just replace p by q and i by N-i.
p N-i
1-
Qi q N
1- p
q
Qi
if
p
<1
q
p
N -i
if
1
N
q
Pi Qi 1
Exercises 2.5
2.5.1
(a)
i 0
c i
1
i!
i
i 0
i!
c
1
0 1 2 3
c
... 1
0! 1! 2! 3!
Note: Maclaurin series for e x
c e 1
c e
(b)
P(Y 0)
(c)
e 0
e
0!
x 0 x1 x 2 x 3
...
0! 1! 2! 3!
P a g e | 27
P(Y 2) 1 P(Y 2)
1 P(Y 0) P(Y 1) P(Y 2)
2e
1 e e
2
2.5.3
x 5
0,
.2, 5 x 0
F (x) .3, 0 x 3
.7, 3 x 6
x6
1,
2.5.5
x
-1
p(x) .2
2.5.7
3 9
.6 .2
3
x3
33
1
(a) c x dx c c 9c 1 , c
9
3 0
3
0
3
2
1
1 3 3 27 8 19
x
.7037
(b) P(2 X 3) x 2 dx
92
27 2
27
27
3
P a g e | 28
F x
x
1 2
1 3 x 1 3
x3
s
ds
s
x
0
27
9 0
27 0 27
(c)
0
3
x
F x
27
1
x0
,
, 0 x3
x3
,
2.5.9
d
F ( x) f ( x)
dx
2
2
x 2 d 2 x(1 x ) 2 x x
2x
2
2
1 x dx
1 x2
1 x2
0,
2x
f ( x)
1 x2
2
x0
2
, x0
2.5.11
145
t
98
145
t
1 120
P(98 X 145)
e dt e120 e 120 e 120 .1432
120
98
98
145
160
P( X 160)
0
160
t
t
160
120
1 120
e dt e 1 e 120 .7364
120
0
2.5.13
d
F (t ) f (t )
dt
(t y)
(t y)
(t y) d (t y) 1 (t y)
d
e
1 e
e
dt
dt
0,
f (t ) (t y) 1 (t y)
e ,
t0
t 0, 0, , y 0.
P a g e | 29
Exercises 2.6
2.6.1
(a) E (X)
6
1
1
1
1
1
1
xp( x) 1 6 2 6 3 6 4 6 5 6 6 6
x 1
e p x 16 e
(b) M x (t ) E e xt
6
xt
1t
x 1
e 2t e3t e 4t e5t e6t
Var ( x) E x 2 E x
1
E x M ' x (0) e1t 2e 2t 3e3t 4e 4t 5e5t 6e6t
t 0
6
1
1 2 3 4 5 6 3.5
6
(c)
1
E x 2 M '' x (0) e1t 4e 2t 9e3t 16e 4t 25e5t 36e6t
t 0
6
1
91
1 4 9 16 25 36
6
6
91
Var x 3.52 2.91667
6
2
2.6.3
(a)
E Y .1 1 .05 0 .25 2 .4 5 .2 6 3.6
2
3
E Y 2 .1 1 .05 0 .25 2 .4 5 .2 6 18.3
2
2
2
2
E Y 3 .1 1 .05 0 .25 2 .4 5 .2 6 95.1
3
3
3
3
Var (Y ) E Y 2 E Y 18.3 3.62 5.34
2
(b) M Y (t) .1e-t .05 .25e2t .4e5t .2e6t
2.6.5
E ( X ) xP( X x) 2 n P( X 2 n )
x
n 1
2n
n 1
1
2n
1
n 1
21
3.5
6
P a g e | 30
2.6.7
1
ax
2
b dx 1
0
1
ax3
bx 1
0
3
a
b 1 or a 3b 3 Eq#1
3
E X
1
x ax
2
5
8
b dx
0
5
8
1
ax 4 bx 2
5
2 0 8
4
5
a b 5
or a 2b Eq#2
2
4 2 8
Eq #1 Eq # 2
5 1
b 3
2 2
3
1 5
a
a 2
2
2 2
1
3
, b
a
2
2
2.6.9
(a)
E(c) cf ( x) c
(b)
E cg ( x) cg ( x) f ( x) c g ( x) f ( x) cE g ( x)
(c)
E gi ( x) gi ( x) fi ( x) g ( x) f ( x) E gi ( x)
i
i
i
i
(d)
V(ax b) E (ax b) E (ax b)
E a x E ( x) a 2 E x E ( x)
2
Plug in b=0 get another one.
2
2
E ax b aE( x) b
2
a E x
2
2
2 a 2V ( x)
P a g e | 31
2.6.11
E ( X) c 1 0 c
V( X ) Ex 2 ( E ( x)) 2 c 2 c 2 0
CDF is F( X ) ( x c) where is indicator function
2.6.13
Mx (t ) e (e
t
1)
E(X) M'x (0) et e (e 1) |t 0
t
E(X 2 ) M"x (0) et e (e 1) (et ) 2 e (e 1) |t 0 2
t
t
V(X) E ( X 2 ) - (E(x)) 2 2 2
2.6.15
(a)
E x xp 1 p
p x 1 p
x 1
x 1
x 1
E x 2 x 2 p 1 p
x 1
x 1
p x x 11 p
x 1
x 1
x 1
1 p 1
p
2
2
p
11 p p
p x x 1 11 p
x 1
x 1
p x 1 p
x 1
x 1
p 1 p x x 11 p
x2
x2
1
p
2 1 2 p 1 p 1 2 2 p p 2 p
p 1 p
2
3
p3
p
p2
p
11 p p
2
2 p 1 1 p
Var x 2
p
p
p
(b)
M X (t ) e xt p 1 p x 1
x 1
1 1 p et 0
1 p et 1
et
1
1 p
t ln 1 p
p t
e 1 p
1 p x 1
x
t
p e 1 p
1 p 1 (1 p)et
pet
t
1 (1 p)e
P a g e | 32
2.6.17
2
3 x 3
x2
6x 2x2 3
E x x dx x
dx
dx 2 x
2
2
2
0
1
2
1
1
2
3
x 4 3 x 4 3x 2 x 4
9x2
3
x
x
4
4 1 8
4 2
8 0
1
3
1 1.5
8
8
2.6.19
Since the moments are represented by the derivative of the MGF, you can integrate the kth
moment to get any other moment of order less than k.