You are on page 1of 14

MAB210-2-13 Solutions Worksheet 3 1

MAB/MAN210: Worksheet Solutions Week 3



A) Questions for Group Work (compulsory)

(These questions are from part A of the Worksheet for Section 3.)


1. Events: N := Nancy is within earshot of her pager (i.e., responds to her pager)
R := Ronald responds to his pager

Probabilities:

( ) ( ) Pr 0.8, Pr 0.5 N R = = .

We want the probability that at least one of them responds to their pager, therefore we
want .

With the general addition rule and then the multiplication rule for independent events,
we obtain

( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( )
Pr Pr Pr Pr
Pr Pr Pr Pr
0.8 0.5 0.8 0.5
0.9
N R N R NR
N R N R
= +
= +
= +
=


Now, let T be the event that a third person responds to his pager, with
( ) Pr 0.6 T = .

The probability that at least one of the three volunteers responds to their pagers is
given by .
With the rule for the complement and then the multiplication rule for independent
events we get

( ) ( )
( )
( )( )( )
Pr 1 Pr none of them respond
1 Pr
1 1 0.8 1 0.5 1 0.6
0.96
N R T
NRT
= (

=
= (

=


So, the adding a third person would increase the probability of at least one volunteer
responding to a call by 0.06.



MAB210-2-13 Solutions Worksheet 3 2
2. Events:
C := customer buys a cap
S := customer buys a scarf
T := customer buys a T-Shirt

Probabilities:
P(C) = 0.6 P(S) = 0.4 P(S|C) = 0.5
P(T|C) = 0.3 P(ST) = 0 P( ) = 0.75

We are looking for P(T).

One possible approach is to start with an equation for the last of the probabilities
given.
With the general addition rule we get

.

The sets S and T are disjoint (as P(S ) = 0), so with the addition rule for disjoint
sets, it follows that

.

We can rewrite the last probability (draw a diagram!) and apply the general addition
rule to it:


.

As we know that P(S ) = 0, the last probability must be 0, too.
For the intersections in the third and fourth probability on the right hand side we can
use the general multiplication rule.

.

Now we have an equation in which all quantities are known, except P(T), which we
would like to find. Finally, we solve our equation for P(T):


.



MAB210-2-13 Solutions Worksheet 3 3
5. Let A, B, C be the events person has disease 1, 2, 3 respectively and let D be the
event person has the symptoms. Let I be the event that person is ill (i.e. they have 1
of the three diseases).

Note: I is really the event they have at least one of the diseases. But because the
diseases are disjoint, you cannot have more than 1 of the three diseases at once, I is
equivalent to having exactly 1 of the three diseases.

We are given the probabilities:




and A,B,C are disjoint. Therefore


(i) We want to find Pr(A|DI). The situation calls for the technique of Bayes Theorem.




This is just Bayes rule, but always conditioning on I. Note that A, B and C are
subsets of being Ill (i.e. having one of the three diseases). So therefore, AI is
equivalent to A, etc. Also using Bayes rule again for the disease given illness
probabilities we obtain:




Therefore we obtain:



.

(ii) We want to find Pr( .

As all our probability rules are valid also for conditional probabilities (see Section 2),
we can use the addition rule here. As A and B are disjoint events (the person cannot
have two diseases at the same time here), we use the addition rule for disjoint sets.

MAB210-2-13 Solutions Worksheet 3 4
Pr(A|DI) is known from (i). For Pr(B|DI) we use the technique of Bayes Theorem
again (same as in (i)), but we can keep things short by using our knowledge from (i)
for the denominator.



.




MAB210-2-13 Solutions Worksheet 3 5



B) Questions for further practice (voluntary)

(These questions are from part B of the Worksheet for Section 3.)

1. Events:
R := "Bert and Ernie come up with the correct answer after having used
strategy (2)"
AC := "Bert and Ernie agree on the correct answer"
AI := "Bert and Ernie agree on the incorrect answer"
D := "Bert and Ernie disagree"
E := "Ernie is right"
B := "Bert is right"

Probabilities:
P(R|AC) = 1 (because their common answer counts)
P(R|AI) = 0 (because their common answer counts)
P(R|D) = 0.5 (because the coin decides)
P(E) = P(B) = p with E and B independent

We would like to know P(R).

The law of total probability yields:

P(R) = P(R AC) + P(R AI) + P(R D)
= P(R|AC)P(AC) + P(R|AI)P(AI) + P(R|D)P(D).

The probabilities P(AC), P(AI) and P(D) can be expressed in terms of P(E) and
P(B) and we can use the multiplication rule for the intersection of independent
events as B and E are said to be independent.

P(AC) = P(E B) = P(E)P(B) = p
2
(multiplication rule for independence)

P(AI) = P(

) = P(

)P(

) (multiplication rule for independence)


= (1 - P(E))(1- P(B)) = (1- p)
2
(rule for the complement)


P(D) = P(

)
= P(E

) + P(

) (addition rule for disjoint events)


= P(E)P(

) + P(

)P(B) = 2p(1- p). (multiplication rule for independence


and rule for the complement)

Using the probabilities given above and the probabilities we just calculated, the
formula of the law of total probability reads:
P(R) = P(R|AC)P(AC) + P(R|AI)P(AI) + P(R|D)P(D)
= 1* p
2


+ 0* (1-p)
2
+ 0.5*2p (1- p) = p.

Answer: It does not matter which strategy Bert and Ernie choose.


MAB210-2-13 Solutions Worksheet 3 6
2. Events:
B := "randomly chosen person is boy"
G := "randomly chosen person is girl" =


P := "randomly chosen person likes punk rock"
H := "randomly chosen person likes hip hop" =



We denote the (unknown) number of boys into hip hop by n.

Probabilities:

P(B) =



P(P) =



P(B P) =



There are always several ways of expressing independence, i.e. there are several ways
of calculating n.

As a criterion for independence, we can use
P(B) = P(B|P), or
P(P) = P(P|B), or
P(B P) = P(B) * P(P),
or any similar expression of the events mentioned above, i.e. events referring to girls
and hip hop, girls and punk rock, or boys and hip hop. (Remember: when two
events are independent, so are their complements, and vice versa.)

Using the first option, for example, we obtain

P(B) = P(B|P)






<=> 10(6 + n) = 6(16 + n)

<=> 60 + 10n = 96 + 6n

<=> n = 9

Answer: 9 boys into hip hop must be at the party for sex and taste of music to
be independent.

MAB210-2-13 Solutions Worksheet 3 7


3. (i)(1) Pr(
1 + k k
A A ) = Pr(
k
A ) Pr(
1 + k k
A A ) but
1 + k
A _
k
A

so Pr(
1 + k k
A A ) = Pr(
1 + k
A ) and Pr(
1 + k k
A A ) = (0.9)
k
(0.9)
k+1


= 0.1(0.9)
k
for k = 1, 2, , 9.

(2) Pr(total at least 28) = Pr(exactly 28)+Pr(exactly 29)+Pr(exactly 30)

= 3Pr(1 gives 10 and other 2 give 9) + 3Pr(1 gives 8 and other 2 give 10)

+ 3Pr(1 gives 9 and other 2 give 10) + Pr(all give 10)

= 3 x 0.1(0.9)
9
x 0.1(0.9)
9
x (0.9)
10
+ 3 x 0.1(0.9)
8
x (0.9)
10
x (0.9)
10

+ 3 x 0.1(0.9)
9
x (0.9)
10
x (0.9)
10
+ (0.9)
10
x (0.9)
10
x (0.9)
10


= (0.9)
28
[0.03 + 0.3 + 0.27 + 0.81] = 0.05233 x 1.41 = 0.0738

(ii) Pr[(CB >10, Oth > 6) (CB > 8, Oth > 8)]
= (0.9)
10
(0.9)
6
+ (0.9)
8
(0.9)
8
Pr(CB >10, Oth > 6, CB > 8, Oth > 8)
= 2(0.9)
16
- Pr(CB >10, Oth > 8)
= (0.9)
16
(2 0.81) = 0.2205

4. Let Y be the event that the warning light should flash (i.e., that the cars oil pressure
IS too low) and A be the event that the light flashes.

Probabilties:
( ) ( ) ( ) Pr | 0.95, Pr | 0.02, Pr 0.1 A Y A Y Y = = = .
We want Pr(Y|A) and use Bayes Theorem.

( )
( ) ( )
( ) ( ) ( ) ( )
( )
( ) ( )
Pr | Pr
Pr |
Pr | Pr Pr | Pr
0.95 0.1
0.95 0.1 0.02 0.9
0.84
A Y Y
Y A
A Y Y A Y Y
=
+

=
+
=


5. Events: D := defective Y:= Test says defective

Probabilities: P(D) = 0.06 P(Y | D) = 0.95



(i) We want Pr(D | Y) and use Bayes Theorem (and the rule for the
complement).

=

=

.

MAB210-2-13 Solutions Worksheet 3 8
(ii) For the unknown probability P(Y|D) we use the variable p. So we have the
following probabilities:

P(D) = 0.06 P(Y | D) = p P(Y | D ) = 0.1

We require P(D | Y ) 0.001. Again we use Bayes Theorem and the rule
for the complement.







1 - p 0.001 (1 - p) + 0.0141
(1 - p) 0.014114
p 0.986.


MAB210-2-13 Solutions Worksheet 3 9
6. (i) Events: Y := device says word occurred, W := word did occur

Probabilities: Pr(W) = 0.1 Pr(Y|W) = 0.98
( )
Pr | 0.05 Y W =

We would like to know Pr(W|Y) and use Bayes Theorem.

Pr(W|Y) = Pr(WY)/Pr(Y)
= Pr(Y|W) Pr(W) /[Pr(Y|W)Pr(W) + Pr(Y|W )Pr(W)]

= 0.98 * 0.1/[0.98 * 0.1 + 0.05 * 0.9]

= 0.685

(ii) Let Pr(Y|

) = p . We require Pr(W|Y) = 0.8.



Using the same equation as in (i) we have

0.8 = 0.98*0.1/[0.98*0.1 + p*0.9]

<=> 0.9 * p = 0.1225 0.098 = 0.0245

<=> p = 0.0272.


7. Events: R := shopper buys new range
M := event shopper is male.
F := shopper is female = M

(i) From the marketing information we have the following probabilities:

P(R) = 0.15 P(R|M) = 0.2 P(R|F)= 0.1.

We are looking for P(M) =: p.
With the law of total probability we obtain:

Pr(R) = Pr(R | M) Pr(M) + Pr(R | F) Pr(F)

<=> 0.15 = 0.2p + 0.1(1-p)

<=> p = 0.5.

(ii) In the supermarket, we have the following probabilities :
P(R) = 0.1 P(F)= 0.6 P(M|R) = 0.7
We are looking for P(R|M) and P(R|F). We use the definition of conditional
probability, then the general multiplication rule and the rule for the complement :

P(R | M) =

=
4 . 0
1 . 0 7 . 0 x
= 0.175
P(R | F) =

.



MAB210-2-13 Solutions Worksheet 3 10
8. Events: D := classified defective
A := component has defect of type A
B := component has defect of type B.

Probabilities:

Pr(D | A) = 0.9 Pr(D | B) = 0.85 Pr(D | AB) = 0.95

Pr
(D| AB)
= 0.1

Pr(A) = 0.04 Pr(B) = 0.02 Pr(AB) = 0.01

(i) We would like to know Pr(A|D).
In view of the numbers given it seems reasonable to start with the technique of
Bayes Theorem, i.e. we use the definition for conditional probabilities followed
by the general multiplication rule.
Pr(A|D)


.
For the denominator we slightly modify the technique of Bayes Theorem: we use
the addition rule for disjoint sets, then the general addition rule and finally the
general multiplication rule:

Pr(D) = Pr(D (A B)) + Pr(D (AB))

= Pr(DA) + Pr(DB) - Pr(DAB) + Pr(D (AB))

= Pr(D | A) Pr(A) + Pr(D | B) Pr(B) - Pr(D | AB) Pr(AB)

+ Pr(D | (AB)) Pr((AB))

= 0.9 x 0.04 + 0.85 x 0.02 - 0.95 x 0.01+ 0.1 x 0.95

= 0.1385

With the equation we had for Pr(A|D) above, we now obtain:

Pr(A | D) =
0.9 0.04
0.1385
= 0.26.

(ii) What is the probability that the component is defective? We are looking for
Pr(AB|D).
The definition of conditional probabilities yields

Pr(A B | D) =



.
With the general addition rule in the numerator we obtain

=


.
We use the general multiplication rule in the numerator and get







MAB210-2-13 Solutions Worksheet 3 11
=
0.9 0.04+0.85 0.020.950.01
0.1385


= 0.314.

9. (i) Consider only non-spam emails, so all the probabilities below are conditional on
Sp , but as we are considering the same condition below, we can omit the | Sp for
the moment. For non-spam emails coming to the staff member, we are told (by the
statement in the brackets) that Ph is the same as the event that the email is about the
new pharmaceutical course.

We use the general addition rule:


( ) ( ) ( ) ( ) Pr Pr Pr Pr Ph L Ph L Ph L = +

For the last term we can use the general multiplication rule:


( ) ( ) ( ) Pr Pr | Pr Ph L L Ph Ph =

Putting the two equation together, we have, for non-spam emails, as
( ) Pr | 1 L Ph = ,

( ) ( ) ( ) ( ) ( ) Pr Pr Pr Pr Pr Ph L Ph L Ph L = + = .

Specifying the condition of non-spam emails (remember: all probability rules remain
valid if we add a condition at the end), this is


( ) ( )
Pr | Pr | Ph L Sp L Sp =


(Remark: Alternatively, we could have started with our probability rules in the
conditional version straight away.)
(ii) Consider only spam emails. We have the probabilities
Pr (Ph|Sp) = 0.2 Pr(L|Sp) = 0.5, with the two events being independent.

We would like to find
( ) Pr | Ph L Sp
.

With the general addition rule, here used with a condition attached (remember all our
rules are valid also for conditional probabilities), we get


( ) Pr | Ph L Sp

= Pr(Ph|Sp) + Pr(L|Sp) Pr(Ph intersection L|Sp).

We apply the multiplication rule for independent events (in a version with a condition
attached) to the last term and obtain:


( ) Pr | Ph L Sp

= Pr(Ph|Sp) + Pr(L|Sp) Pr(Ph|Sp)Pr(L|Sp).

= 0.2 + 0.5 0.2*0.5 = 0.6.

MAB210-2-13 Solutions Worksheet 3 12

(iii)
( ) ( )
Pr 0.1, Pr | 0.3 Sp L Sp = = .

We want to know Pr( . We follow the procedure of Bayes Theorem, i.e.
we use the definition of conditional probabilities and the general multiplication rule
for the numerator.

( )
( ) ( )
( )
Pr | Pr
Pr |
Pr
Ph L Sp Sp
Sp Ph L
Ph L

.

For the denominator we use the law of total probability.

( ) ( ) ( ) ( ) ( )
( ) ( )
Pr Pr | Pr Pr | Pr
0.6 0.1 0.3 0.9
0.33
Ph L Ph L Sp Sp Ph L Sp Sp = +
= +
=


Hence we have

( )
( ) 0.6 0.1
Pr | 0.1818
0.33
Sp Ph L

= = .

MAB210-2-13 Solutions Worksheet 3 13
10. Events:
B := bacteria present, Y := test says bacteria are present
A := bacteria not present, N := test says bacteria are not present.
Probabilities:
Pr(B) = 0.02 Pr(Y|B) = 0.95 Pr(Y|A) = 0.1

(i) We use the technique of Bayes Theorem.

Pr(A|Y) = Pr(AY)/Pr(Y) = Pr(Y|A)Pr(A)/Pr(Y)
(definition of conditional probabilities and general multiplication rule for the
numerator)

Pr(Y) = Pr(Y|A)Pr(A) + Pr(Y|B)Pr(B)
(law of total probability for the denominator)

Hence (using the rule for the complement to get Pr(A)) we have

Pr(A|Y) =
0.1x0.98
0.1x0.98 + 0.95x0.02
=
0.098
0.117
= 0.8376

(ii) Again, we use the technique of Bayes Theorem.

Pr(B|N) = Pr(BN)/Pr(N) = Pr(N|B)Pr(B)/Pr(N)
(definition of conditional probabilities and general multiplication rule for the
numerator)

For the denominator we can make our life a bit easier and simply use the
complement of the denominator from (i), i.e.

Pr(N) = 1 Pr(Y) = 1 0.117 = 0.883

In sum we get Pr(B|N) =
0.05x0.02
0.883
= 0.00113

(iii) Now we have the new events
D := water sample comes from dam
C := water sample does not come from dam

and the new probabilities Pr(D) = 2/3 and Pr(C) = 1/3. The probabilities P(Y|A)
and P(Y|B) do not change, not matter where the water is from.

Using Bayes Theorem we get

Pr(B|N) = Pr(BN)/Pr(N) = Pr(N|B)Pr(B)/[Pr(N|B)Pr(B) + Pr(N|A)Pr(A)]

Except Pr(B) all quantities are know. We obtain Pr(B) by using the law of total
probability with respect to the events C and D:
Pr(B) = Pr(B|D)Pr(D) + Pr(B|C)Pr(C) = 0.02 * 2/3 + 0.03 * 1/3= 0.0233.

Hence we have
Pr(B|N) = 0.05 * 0.0233/[0.05*0.0233 + 0.9*0.98] = 0.00132.


MAB210-2-13 Solutions Worksheet 3 14
OR, ALTERNATIVELY, we could use the definition of conditional probabilities
and then the law of total probability twice, in both the numerator and the denominator.
(In the numerator, we would use the law of total probability for the event BN.)
Doing so yields :

Pr(B|N) = Pr(BN)/Pr(N) =
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
Pr | Pr Pr | Pr
Pr | Pr Pr | Pr
BN D D BN C C
N D D N C C
+
+


and we find Pr(N|C) in the same way as Pr(N|D)

so Pr(N|C) = 0.05x0.03 + 0.9x0.97

Hence Pr(B|N) =
0.05x0.02x2/3 + 0.05x0.03x1/3
0.883x2/3 + 0.8745x1/3
=
0.001167
0.58867 + 0.2915


= 0.00133

[Note that the above are NOT the same as
0.05x0.02
0.883
x 2/3 +
0.05x0.03
0.8745
x 1/3
That is if you use Pr(B|N) = Pr(B|N&D)Pr(D|N) + Pr(B|N&C)Pr(C|N)
then although Pr(B|N&D) is as found in (ii), and similarly for Pr(B|N&C), note that
Pr(D|N) is NOT Pr(D)]

11.

Events: E := Ernie attends, B := Bert attends, M := Miss Piggy attends
These 3 events are mutually independent. (Unless we assumed that Berts
commitments were somehow related to Miss Piggys plane.)

Probabilities: P(E) = 0.5, P(B) = 0.9, P(M) = 0.8

(i) We are looking for P(E B).

P(E B) = P(E) + P(B) P(E B) [general addition rule]
= P(E) + P(B) P(E)P(B) [multiplication rule for independent events]
= 0.5 + 0.9 - 0.5 * 0.9 = 0.95.

(ii) We are looking for P( ).

P( )
= P(EB) + P(M B

) + P(


[addition rule for disjoint sets; draw a set diagram to see this]

= P(E)P(B) + P(M)P(B)P(

) + P(M)P(E)P(

)
[multiplication rule for the mutually independent events E, B, M and their
complements]
= P(E)P(B) + P(M)P(B)[1 - P(E)] + P(M)P(E)[1 - P(B)]
[rule for the complement of an event]

= 0.5 * 0.9 + 0.8 * 0.9 * [1 0.5] + 0.8 * 0.5 * [1 0.9] = 0.85.

You might also like