Solution

MAE 108 - Probability and Statistical Methods for Engineers - Spring 2015
Midterm 1, April 24
Instructions
(i) One cheat sheet with notes and calculator with no communication capabilities are allowed,
(ii) No cellphones, tablets, or laptops,
(iii) You have 50 minutes,
(iv) Justify all your answers,
(v) Do not forget to write your name and student number in your exam.
Questions
1. (10 points) The component of a machine undergoes a test before the machine is placed on the market. Let A be the event that the component fails the test, and B be the event that the component
displays strain but does not fail the test. Event A occurs with probability 0.20, and event B occurs
with probability 0.35.
(i) What is the probability that the component does not fail the test?
(ii) What is the probability that the component either fails or shows strain in the test?
(iii) What is the probability that the component works perfectly well (i.e., neither displays strain nor
fails the test)?
Solution:
3 pts
¯ Therefore, its probability is
(i) The event ”the component does not fail the test” is A.
¯ = 1 − P (A) = 1 − 0.20 = 0.80.
P (A)
1
4pts
1
1
(ii) The event ”the component either fails or shows strain” is A ∪ B. Using the additive rule,
and noting that A and B are mutually exclusive, we find
P (A ∪ B) = P (A) + P (B) − P (AB) = 0.20 + 0.35 − 0.0 = 0.55.
3pts
1
2
1
(iii) The event ”the component works perfectly well” is A ∪ B. Using the property of the complementary, we obtain
P (A ∪ B) = 1 − P (A ∪ B) = 1 − 0.55 = 0.45.
1
1
1
2. (8 points) At a coffee table there are two boxes of mixed cookies. Box 1 has 45 cookies, 20 of which
are peanut butter cookies. Box 2 has 55 cookies, 15 of which are peanut butter cookies. Suppose that
picking from a box is equally likely. Then:
(i) What is the probability that the cookie is a peanut butter cookie if you picked it from box 1? and
if it was taken from box 2?
(ii) What is the probability of taking a peanut butter cookie?
(iii) Suppose you picked a peanut butter cookie, what is the probability that it was taken from box 2?
Solution:
2 pts
(i) Let C be the event, “C = the chosen cookie is a peanut butter cookie”, B1 “the cookie is taken
from box 1”, and B2 “the cookie is taken from box 2.” Then,
P (C|B1 ) =
1
3 pts
20
= 0.44
45
P (C|B2 ) =
1
15
= 0.27
55
(ii) By the theorem of total probability, and using {B1 , B2 } is a set of completely exhaustive and
mutually exclusive events,
P (C) = P (C|B1 )P (B1 ) + P (C|B2 )P (B2 ) = 0.44 ∗ 0.5 + 0.27 ∗ 0.5 = 0.355
3 pts
2
1
(iii) By Bayes rule:
P (B2 |C) =
P (C|B2 ) ∗ P (B2 )
0.27 ∗ 0.5
=
= 0.38
P (C)
0.355
2
1
3. (10 points) In a country composed of rural and urban areas, the following data was found: (i) The
proportion of people living in a rural area is 25%, (ii) the proportion of people who are tobacco smokers when they live in rural areas is 20%, while this proportion is 35% for people living in urban and
polluted areas, (iv) the proportion of people who have lung cancer in the country is 20%, (iii) the
proportion of people who have lung cancer and are tobacco smokers is 15%.
(i) If you pick a person at random, what is the probability that this person lives in a rural area? and
in an urban area?
(ii) What is the probability that a person is a tobacco smoker?
(iii) To evaluate the causes of lung cancer in the country, compute what is the probability that a
person has lung cancer if (s)he is a tobacco smoker.
(iv) According to this numerical result, are the events “a person has lung cancer” and “a person is a
tobacco smoker” independent? justify your answer.
Solution:
2 pts
1
¯ = U,
(i) Let R be the event “the person lives in a rural area.” Then, P (R) = 0.25. Note that R
is the event the person lives in an urban area. Then, P (U ) = 0.75.
3 pts
1
(ii) Let T be the event “the person is a tobacco smoker.” Then, we can use the theorem of
total probability with the events {R, U }, which are collectively exhaustive, S = R ∪ U , and
¯ = ∅. In this way,
mutually exclusive, R ∩ U = R ∩ R
P (T ) = P (T |R)P (R) + P (T |U )P (U ) = 0.2 ∗ 0.25 + 0.35 ∗ 0.75 = 0.3125 .
2
1
Page 2
3 pts
(iii) Let L be the event “the person has lung cancer.” Then,
P (L|T ) =
2
2 pts
P (LT )
0.15
=
= 0.48
P (T )
0.3125
1
(iv) We have that P (L) = 0.20 < P (L|T ), so L and T are not statistically independent.
2
Page 3