Vous êtes sur la page 1sur 7

PDT Module 2 solutions

Exercise 2.1 in Module 2 Notes


Let Y be the number of red cells in these 4 possible sub-volumes, with a prob-
ability of 0.01 of a presence of a red cell in a sub-volume, so Y Bin(4, 0.01).
Then P(Y = 1) =

4
1

0.01
1
(1 0.01)
3
= 4 0.01 0.99
3
= 0.0388.
Exercise 2.2 in Module 2 Notes
This is similar to the previous question except that we now have n = 100
and p = 0.1, so Y Bin(100, 0.1).
Then P(Y = 2) =

100
2

0.1
2
(1 0.1)
98
=
100!
2!98!
0.1
2
0.9
98
=
10099
2
0.1
2
0.9
98
=
0.0016.
WMS Exercise 3.40, p111
Let Y be the number out of the 20 patients who recover from stomach dis-
ease. Then Y Bin(20, 0.8).
a) P(Y = 14) =

20
14

0.8
14
0.2
6
=
20!
14!6!
0.8
14
0.2
6
= 0.1090997.
There are a number of ways this can be computed. The rst way is by plug-
ging the numbers into a calculator as above. The second way is to use Table 1
in Appendix 3 of WMS (p839) which presents left tail cumulative probabilities
of the form P(Y y). So to use that Table to compute P(Y = 14) you need
to note that P(Y = 14) = P(Y 14) P(Y 13), and from the Table this
is 0.196 0.087 = 0.109. The third way is to use the binomialtail function
in Stata as mentioned in the module notes, but note that it computes right
tail probabilities, ie P(Y y). So P(Y = 14) = P(Y 14) P(Y 15) ,
and to get this in Stata use :
display binomialtail(20,14,0.8)-binomialtail(20,15,0.8)
and you get the answer 0.1090997.
The key is to make sure you know whether you are dealing with left tail
or right tail cumulative probabilities. The Table in WMS uses left tail as
does the binomial function in Stata, but binomialtail uses right tail.
b) P(Y 10) = 1 P(Y 9) = 1 .001 = 0.999 using WMS Table 1
in Appendix 3. Alternatively, in Stata
display binomialtail(20,10,0.8) = 0.9994.
c) P(14 Y 18) = P(Y 18) P(Y 13) = 0.931 0.087 = 0.844
using the WMS Table. Alternatively, in Stata, note that P(14 Y 18) =
1
P(Y 14) P(Y 19), so use
display binomialtail(20,14,0.8)-binomialtail(20,19,0.8) = 0.844.
d) P(Y 16) = 0.589 from the WMS Table, or in Stata
display binomial(20,16,0.8).
WMS Exercise 3.41, p111
Let Y be the number answered correctly. Then p=P(correct answer)=
1
5
and
n = 15.
P(Y 10) = 1 P(Y 9)
Using Table 1 for n = 15 (Appendix Three WMS page 840) which to three
decimal places gives
P(Y 9) = 1.000
Hence P(Y 10) = 0.000 to three decimal places and we can report P(Y
10) < 0.001.
WMS Exercise 3.44 p111
Let Y be the number of successful operations out of the 5 performed. Then
Y Bin(5, p) as p varies in the parts of the question.
a) p = 0.8. P(Y = 5) =

5
5

0.8
5
(1 0.8)
0
= 0.8
5
= 0.328.
b) p = 0.6. P(Y = 4) =

5
4

0.6
4
(1 0.6)
1
= 5 0.6
4
0.4 = 0.259.
c) p = 0.3. P(Y < 2) = P(Y = 0) +P(Y = 1) = (10.3)
5
+50.30.7
4
=
0.1681 + 0.3602 = 0.528. Using the WMS Table directly gives 0.528 as well.
WMS Exercise 3.61 p113
Let Y = # who have Rh+ blood. Y is binomial with n = 5 and p = 0.8.
a. P(at least one does not have Rh+) = P(Y 4) = 0.672
b. P(Y 4) = 0.672
c. Y is now binomial with unknown n and p = 0.8. P(Y 5) = 1 P(Y
4) > 0.9. Therefore, P(Y 4) < 0.1. Using Table 1, we nd that required
sample size is between n = 5 and n = 10. By calculating P(Y 4) for all
values of n between 5 and 10 we nd that n = 8 is the smallest such that
P(Y 4) < 0.1.
2
WMS Exercise 3.188 p152
P(Y > 1|Y 1) =
P(Y > 1 and Y 1)
P(Y 1)
=
P(Y > 1)
P(Y 1)
=
1 [P(Y = 0) +P(Y = 1)]
1 P(Y = 0)
=
1 (1 p)
n
np(1 p)
n1
1 (1 p)
n
.
Note that the second line follows from the rst because the only way Y > 1
and Y 1 simultaneously is if Y > 1.
Exercise 2.3 in Module 2 Notes
Y is Poisson distributed with mean = 20. P(Y = 12) =
e
20
20
12
12!
= 0.018
to 3 decimal places.
Alternatively, using WMS Table 3 of Appendix 3 p847, P(Y = 12) = P(Y
12) P(Y 11) = 0.039 0.021 = 0.018.
Exercise 2.4 in Module 2 Notes
For a probability distribution, one needs to verify that P(Y = y) 0 for all
values of y, P(Y = y) 1 for all values of y, and

y=0
P(Y = y) = 1.
WMS Example 3.18 on page 132 uses the fact that

y=0

y
y!
= e

to show
that

y=0
P(Y = y) = 1.
P(Y = y) = e

y
/y! and each of these quantities are greater than 0, and so
P(Y = y) > 0 for all y [unless = 0, which is a most uninteresting case!].
P(Y = y) < 1 follows straight away since the probabilities sum to 1 and
they are all greater than 0.
Exercise 2.5 in Module 2 Notes
Y is Poisson with mean 20, so P(Y < 15) = P(Y 14) = 0.105 using WMS
3
Table 3 p847.
WMS Exercise 3.121 p136
a) P(Y = 4) =
2
4
4!
e
2
= 0.090
or using Table 3, Appendix III, P(Y = 4) = P(Y 4) P(Y 3) =
0.947 0.857 = 0.090
b) P(Y 4) = 1 P(Y 3) = 1

3
y=0
2
y
y!
e
2
= 1 0.857 = 0.143
Note that P(Y 3) = 0.857 can also be obtained from Table 3, Appendix
Three (WMS page 843-847).
c) P(Y < 4) = P(Y 3) = 0.857
d) Recall from part b that P(Y 4) = 0.143 and note that P(Y 2) =
1 P(Y 1) = 1 0.406 = 0.594. Hence,
P(Y 4|Y 2) =
P(Y 4 and Y 2)
P(Y 2)
=
P(Y 4)
P(Y 2)
=
0.143
0.594
= 0.241
WMS Exercise 3.137 p137
Use the Poisson approximation to the binomial with = np = 30(0.2) = 6.
Then,
P(Y 3) =
3

y=0
6
y
y!
e
6
= e
6
+ 6e
6
+
36
2
e
6
+
216
6
e
6
= 61e
6
= 0.1512
WMS Exercise 3.134 p137
Use Y as binomial with n = 20 and p = 0.05, and also as Poisson with
= np = 20 0.05 = 1. To compute P(Y = y) for y = 0, 1, 2, 3, 4 you can
either do it directly or use the WMS tables.
y Binomial Poisson
0 0.358 0.368
1 0.378 0.368
2 0.189 0.184
3 0.059 0.061
4 0.013 0.015
4
These are quite close, but they would be closer if n was larger and p smaller.
WMS Exercise 3.197 p153
a. Let X be the number of bacteria colonies in a one-cubic-centimeter sample.
Then X has a Poisson distribution with = 2. Now let Y be the number
of the four one-cubic-centimeter samples that have one or more bacterial
colonies. Note that Y has a binomial distribution with n = 4 and
p = P(a sample contains one or more bacteria colonies)
= P(X 1) = 1 P(X = 0) = 1 0.135 = 0.865
Thus,
P(at least one sample contains one or more bacteria colonies)
= P(Y 1) = 1 P(Y = 0) = 1

4
0

(0.865)
0
(0.135)
4
= 0.9997
b. We need to nd the number of samples, n, such that approximately
P(Y 1) = 1 P(Y = 0) = 1

n
0

(0.865)
0
(0.135)
n
= 0.95
which simplies to (0.135)
n
= 0.05. Note that ln(0.135)
n
= nln(0.135).
Hence we require
nln(0.135) = ln(0.05)
so n =
ln(0.05)
ln(0.135)
= 1.496.
So, being conservative, we take n = 2.
Exercise 2.6 in Module 2 Notes
E[Y ] =
2

y=0
yP(Y = y) = 0 1/4 + 1 1/2 + 2 1/4 = 1.
WMS Exercise 3.215 p156
a. If method (1) is used, N tests are required, regardless of the number of
people having the disease. However, for method (2) there are two possible
values for n

, the number of tests required for a group of k people. If all


k people are healthy, then only one test is required. The probability that
n

= 1 is
P(n

= 1) = P(k people healthy) = (0.95)


k
If at least one of the total k people has the disease, then the test is positive
5
and k more tests (making a total of k + 1) are required. Note that
P(n

= k + 1) = P(at least one diseased person)


= 1 P(all people healthy)
= 1 (0.95)
k
Hence,
E(n

) =

p(n

) = 1(0.95)
k
+ (k + 1)(1 0.95
k
)
= 0.95
k
+k + 1 k(0.95)
k
0.95
k
= 1 +k(1 0.95
k
)
This expectation holds for each group so that for n groups the expected num-
ber of tests is n[1 +k(1 0.95
k
)].
Exercise 2.7 in Module 2 Notes
Following WMS, the variance
2
is computed directly as E[(Y )
2
]. How-
ever, it is often convenient to calculate the variance using
Var(Y ) = E(Y
2
) [E(Y )]
2
.
Calculating E(Y
2
) manually:
E(Y
2
) = 0
2
1/8+1
2
1/4+2
2
3/8+3
2
1/4 = 0+1/4+12/8+9/4 = 4.
Therefore, since the mean is 1.75, Var(Y ) = 4 1.75
2
= 0.9375.
Exercise 2.8 in Module 2 Notes
For the Bernoulli distribution, P(Y = 1) = p, P(Y = 0) = 1 p.
E[Y ] =

1
y=0
yP(Y = y) = 0 (1 p) + 1 p = p.
E[Y
2
] =

1
y=0
y
2
P(Y = y) = 0
2
(1 p) + 1
2
p = p.
Therefore Var(Y ) = E(Y
2
) [E(Y )]
2
= p p
2
= p(1 p).
One can plot the graph of f(p) = p(1 p) for 0 < p < 1 and see that
it attains its maximum at p = 0.5.
To do this via calculus:
Take the rst derivative of p(1 p) with respect to p.
d
dp
p(1 p) = 1 2p.
Setting this equal to 0 gives p = 0.5 as a turning point. Dierentiating
again with respect to p gives
d
2
dp
2
p(1 p) = 2, which is less than zero,
indicating a maximum at p = 0.5.
6
Exercise 2.9 in Module 2 Notes
E(Y ) = 1 has already been calculated in Ex 2.6.
E(Y
2
) = 0
2
1/4 + 1
2
1/2 + 2
2
1/4 = 0 + 1/2 + 1 = 1.5.
Therefore Var(Y ) = E(Y
2
) [E(Y )]
2
= 1.5 1
2
= 0.5.
Exercise 2.10 in Module 2 Notes
E(X) = 0 1/4 +1 1/8 +2 1/8 +3 1/2 = 0 +1/8 +2/8 +3/2 = 1.875.
E(X
2
) = 0
2
1/4+1
2
1/8+2
2
1/8+3
2
1/2 = 0+1/8+4/8+9/2 = 5.125.
Therefore Var(X) = 5.125 1.875
2
= 1.609.
7

Vous aimerez peut-être aussi