HW2_solution
pdf
keyboard_arrow_up
School
University of Texas *
*We aren’t endorsed by this school
Course
382
Subject
Industrial Engineering
Date
Jan 9, 2024
Type
Pages
10
Uploaded by surker21
CEE 373
Homework #2
Due date: September 15 at 5pm
Total: 100 points
1. (20 points) A General Contractor is managing three different renovation projects
in the Metro Detroit Area. Let
A
i
denote the event that renovation project at
site
i
is completed by the contract date.
For each of the following events, (1) describe the event as set operations in terms
of
A
1
,
A
2
, and
A
3
using union, intersection, and complementation notation and
(2) draw a Venn diagram shading the region that describes the event.
(a) Two projects are completed by the contract date.
(b) Three projects are not completed by the contract date.
(c) Only the project at site 1 is completed by the contract date.
(d) Exactly one project is completed by the contract date.
(e) Either the project at site 1 or both of the other two projects are completed
by the contract date.
Solution:
(a) (
A
1
∩
A
2
∩
A
3
)
∪
(
A
1
∩
A
2
∩
A
3
)
∪
(
A
1
∩
A
2
∩
A
3
)
(b)
A
1
∪
A
2
∪
A
3
Page 1 of 10
CEE 373
Homework #2
(c)
A
1
∩
A
2
∩
A
3
(d) (
A
1
∩
A
2
∩
A
3
)
∪
(
A
1
∩
A
2
∩
A
3
)
∪
(
A
1
∩
A
2
∩
A
3
)
(e)
A
1
∪
(
A
2
∩
A
3
)
2. (20 points) Assume that you are a design engineer in Puerto Rico, where the
probability of a high wind occurring in any single minute is 10
−
7
, and the proba-
bility of a strong earthquake occurring in any single minute is 10
−
5
. Assume that
the occurrence of high winds and strong earthquakes is independent.
Page 2 of 10
CEE 373
Homework #2
(a) What is the probability of both high wind and a strong earthquake occurring
in the same minute in Puerto Rico?
(b) What is the probability of one or the other events occurring in the same
minute?
(c) Building codes do not require you as an engineer to design buildings for the
combined effect of wind and earthquake. Is this reasonable?
(d) For rare events, engineers often assume that
P
(
E
1
∪
E
2
)
∼
=
P
(
E
1
) +
P
(
E
2
).
Is this a reasonable assumption?
(e) If the occurrence of events in successive minutes is mutually independent,
what is the probability that there will be no high winds in Puerto Rico this
year? What is the probability that there will be no high winds in Puerto
Rico in 10 years?
Note: while high winds and an earthquake didn’t occur in the same minute, Puerto
Rico faced two hurricanes (Irma and Maria) in 2017, earthquakes in 2019, and
the COVID-19 pandemic in 2019), from which they are still recovering.
Solution:
Denote occurrence of high wind as
E
1
and the occurrence of strong
earthquake as
E
2
(a)
P
(
E
1
∩
E
2
) =
P
(
E
1
)
P
(
E
2
) = 10
−
5
·
10
−
7
= 10
−
12
(As
E
1
and
E
2
and inde-
pendent)
(b)
P
(
E
1
∪
E
2
) =
P
(
E
1
) +
P
(
E
2
)
−
P
(
E
1
E
2
) = 10
−
5
+ 10
−
7
−
10
−
12
≃
1
.
01
∗
10
−
5
(c) If both events are very rare the probability of their joint occurrence is negligi-
ble, so neglecting the joint effect of earthquake and winds is reasonable.
(d)
P
(
E
1
∪
E
2
) =
P
(
E
1
) +
P
(
E
2
)
−
P
(
E
1
E
2
).
For rare events the probability
P
(
E
1
E
2
) is negligible so it can be neglected leading to the formula
P
(
E
1
∪
E
2
)
≃
P
(
E
1
)+
P
(
E
2
). When dealing with probabilities of hazardous situations
this leads to over estimation of probability which is conservative.
If the probabilities are not small, however, then the approximation is not
accurate and in some cases can even lead to probabilities greater than 1.
(e)
P
(no high wind in a year) =
P
(
¯
E
1
)
365
∗
24
∗
60
= (1
−
10
−
7
)
525600
= 0
.
949
P
(no high wind in 10 years) =
P
(
¯
E
1
)
365
∗
24
∗
60
∗
10
= (1
−
10
−
7
)
5256000
= 0
.
591
Page 3 of 10
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
CEE 373
Homework #2
3. (15 points) Consider the transportation network below. Links
A
-
E
connect nodes
1-4. Each link may be “open” or “closed.” If a link is “open,” it is possible to
travel across that link, and if it is “closed,” it is impossible.
Let’s define event
E
A
as the event in which link
A
is open, and we define events
E
B
, E
C
, ...E
E
analogously.
(Let
¯
E
A
...
¯
E
E
be the complements of these events.)
We can now define other events in terms of these “link” events. For example, let
E
14
be the event in which a path is open between nodes 1 and 4. Then we may
say that:
E
14
= (
E
A
∩
E
D
)
∪
(
E
E
∩
E
C
)
∪
(
E
E
∩
E
B
∩
E
D
)
∪
(
E
A
∩
E
B
∩
E
C
)
For each of the cases below, find a similar set-theoretic expression for the event
described, in terms of events
E
A
....
E
E
together with their complements.
(a)
E
13
, the event in which an open path exists between nodes 1 and 3
(b)
¯
E
13
, the event in which there is no open path between nodes 1 and 3
(c)
E
13
∩
¯
E
34
, the event in which an open path exists between nodes 1 and 3 but
not between 3 and 4
Note: In each case, your final answers need to have the following characteristics:
Distribute all intersections over unions. For example:
(
E
A
∪
E
B
)
∩
¯
E
C
=
(
E
A
∩
¯
E
C
)
∪
(
E
B
∩
¯
E
C
)
Use the fact that unions are associative to eliminate parentheses. For example:
(
E
A
∪
E
B
)
∪
¯
E
C
=
E
A
∪
(
E
B
∪
¯
E
C
)
=
E
A
∪
E
B
∪
¯
E
C
Make use of mutual exclusivity wherever possible, to simplify; i.e.,
E
B
∪
(
E
C
∩
¯
E
C
)
=
E
B
∪ ∅
=
E
B
Make use of complementarity wherever possible, to simplify; i.e.,
E
A
∩
(
E
C
∪
¯
E
C
)
=
E
A
∩
S
=
E
A
Eliminate all compound complements; i.e.,
E
A
∪
E
B
=
¯
E
A
∩
¯
E
B
E
A
∩
E
B
=
¯
E
A
∪
¯
E
B
Page 4 of 10
CEE 373
Homework #2
Solution:
For this problem, we are mainly looking for how you arrive at the initial
set theoretic expression, rather than a correct simplification of that set theoretic
expression.
(a) We see that there are 3 distinct paths from 1 to 3 that do not double back on
themselves that need to be open:
•
A
→
B
•
A
→
D
→
C
•
E
The following events describe these paths:
•
(
E
A
∩
E
B
)
•
(
E
A
∩
E
D
∩
E
C
)
•
E
E
Event
E
13
is the union of the events representing any of these path being open:
E
13
= (
E
A
∩
E
B
)
∪
(
E
A
∩
E
D
∩
E
C
)
∪
E
E
(b) For there to be no route from 1 to 3, we identify routes that instead need to
be closed:
•
E
is the most direct path that connects 1 and 3 directly, so it needs to
be closed no matter what.
In addition to
E
being closed, one of the
following paths needs to be closed:
–
B
and
C
are closed,
–
B
and
D
are closed, OR
–
A
is closed
The above 3 scenarios can be described by the following 3 compound events:
•
¯
E
E
∩
(
¯
E
B
∩
¯
E
C
)
•
¯
E
E
∩
(
¯
E
B
∩
¯
E
D
)
•
¯
E
E
∩
¯
E
A
We then get
¯
E
13
as the union of these events:
¯
E
13
=
(
¯
E
E
∩
¯
E
B
∩
¯
E
C
)
∪
(
¯
E
E
∩
¯
E
B
∩
¯
E
D
)
∪
(
¯
E
E
∩
¯
E
A
)
(c) For this part, we know
E
13
from part (a).
To calculate
¯
E
34
, we follow similar reasoning as to part (b).
For there to be no route from 3 to 4, we identify routes that need to be closed:
Page 5 of 10
CEE 373
Homework #2
•
C
is the most direct path that connects 3 and 4 directly, so it needs to
be closed no matter what.
In addition to
C
being closed, one of the
following paths needs to be closed:
–
D
is closed OR
–
B
is closed AND
∗
A
is closed OR
∗
E
is closed
Describing the above 3 scenarios we get:
¯
E
34
=
¯
E
C
∩
(
¯
E
D
∪
(
¯
E
B
∩
(
¯
E
A
∪
¯
E
E
)))
=
(
¯
E
C
∩
¯
E
D
)
∪
(
¯
E
C
∩
¯
E
B
∩
(
¯
E
A
∪
¯
E
E
))
=
(
¯
E
C
∩
¯
E
D
)
∪
(
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
¯
E
C
∩
¯
E
B
∩
¯
E
E
)
You could also directly get to the last line of
¯
E
34
.
Combining our expression for
¯
E
34
with our expression for
E
13
from part (a),
we get:
E
13
∩
¯
E
34
= [(
E
A
∩
E
B
)
∪
(
E
A
∩
E
D
∩
E
C
)
∪
E
E
]
∩
(
¯
E
C
∩
¯
E
D
)
∪
(
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
¯
E
C
∩
¯
E
B
∩
¯
E
E
)
This expression is fine to describe
E
13
∩
¯
E
34
, but if you wanted to simplify it
further, you would do the following.
Distribute all intersections over unions:
E
13
∩
¯
E
34
=
(
E
A
∩
E
B
∩
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
E
A
∩
E
B
∩
¯
E
C
∩
¯
E
B
∩
¯
E
E
)
∪
(
E
A
∩
E
B
∩
¯
E
C
∩
¯
E
D
)
∪
(
E
A
∩
E
D
∩
E
C
∩
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
E
A
∩
E
D
∩
E
C
∩
¯
E
C
∩
¯
E
B
∩
¯
E
E
)
∪
(
E
A
∩
E
D
∩
E
C
∩
¯
E
C
∩
¯
E
D
)
∪
(
E
E
∩
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
E
E
∩
¯
E
C
∩
¯
E
B
∩
¯
E
E
)
∪
(
E
E
∩
¯
E
C
∩
¯
E
D
)
(1)
For any
i
∈ {
A, B, C, D, E
}
,
E
i
∩
¯
E
i
=
∅
and
E
i
∩∅
=
∅
. So the above simplifies
to
E
13
∩
¯
E
34
=
(
E
A
∩
E
B
∩
¯
E
C
∩
¯
E
D
)
∪
(
E
E
∩
¯
E
C
∩
¯
E
B
∩
¯
E
A
)
∪
(
E
E
∩
¯
E
C
∩
¯
E
D
)
(2)
4. (20 points)
A
and
B
are two events such that
P
(
A
) = 0
.
4,
P
(
B
) = 0
.
6 and
P
(
AB
) = 0
.
3. Compute the following conditional probabilities.
(a)
P
(
A
|
B
)
Page 6 of 10
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
CEE 373
Homework #2
(b)
P
(
¯
A
|
¯
B
)
(c)
P
(
B
|
¯
A
)
(d)
P
(
A
∪
B
|
B
)
(e)
P
(
A
∪
B
|
¯
B
)
Solution:
Given
P
(
A
) = 0
.
4,
P
(
B
) = 0
.
6 and
P
(
AB
) = 0
.
3
(a)
P
(
A
|
B
) =
P
(
AB
)
P
(
B
)
=
0
.
3
0
.
6
=
1
2
(b)
P
(
¯
A
|
¯
B
) =
P
(
¯
A
¯
B
)
P
(
¯
B
)
=
P
(
A
∪
B
)
1
−
P
(
B
)
=
1
−
P
(
A
∪
B
)
1
−
P
(
B
)
=
1
−
P
(
A
)
−
P
(
B
)+
P
(
AB
)
1
−
0
.
6
=
0
.
3
0
.
4
=
3
4
(c)
P
(
B
|
¯
A
) = 1
−
P
(
¯
B
|
¯
A
) = 1
−
1
−
P
(
A
∪
B
)
1
−
P
(
A
)
= 1
−
1
−
P
(
A
)
−
P
(
B
)+
P
(
AB
)
1
−
0
.
4
=
1
2
(d)
P
(
A
∪
B
|
B
) =
P
(
A
|
B
) +
P
(
B
|
B
)
−
P
(
AB
|
B
) =
P
(
A
|
B
) + 1
−
P
(
A
|
B
) = 1
(e)
P
(
A
∪
B
|
¯
B
) =
P
(
A
|
¯
B
) +
P
(
B
|
¯
B
)
−
P
(
AB
|
¯
B
) =
1
4
+ 0
−
0 =
1
4
5. (25 points) The following question will make use of
geocoded_bridges.csv
,
which you worked with in HW1. This dataset includes information on the year
built (
yr_built
), daily average traffic (
avg_daily_traffic
), bridge condition
(
bridge_condition
), and bridge location (
lat,long,county
) of all bridges in
Maryland. When necessary, please use these columns in the dataset and attach
your programming code along with your answers to the below questions.
Imagine you work with the Department of Transportation (DOT) in Maryland.
The DOT classifies a bridge as ‘
priority management
’ if it meets the following
conditions:
•
Event 1,
E
1
: was built before 1971,
•
Event 2,
E
2
: has a daily average traffic count of 20,000 cars or more, and
•
Event 3,
E
3
: is in ‘poor’ bridge condition.
Based on these criteria, we would like to decide which regions are most vulnerable
and need to be prioritized for future budget allocations.
(a) Calculate the probabilities of
E
1
,
E
2
, and
E
3
for the dataset.
(b) Calculate the same probabilities of
E
1
,
E
2
, and
E
3
if we consider only the
bridges within ‘Baltimore City’ (Event 4,
E
4
). Compare and interpret these
probabilities to that of Part (a).
Page 7 of 10
CEE 373
Homework #2
(c) Consider the event (
E
1
∪
E
3
)
∩
(
E
2
∩
E
4
). Please simplify this event using De
Morgan’s law. In addition, please draw a Venn Diagram that includes
E
1
,
E
2
,
E
3
,
E
4
, and
S
, and highlight the corresponding area. Finally, calculate
the probability for this area and describe its meaning using plain language.
(d) DOT primarily allocates their annual budget to regions where
P
(
E
1
, E
3
|
E
2
)
is high.
Calculate this conditional probability
for each county
, and deter-
mine which county should receive the primary budget allocation for bridge
management.
(e) You instead want to calculate the probabilities in part (d) by grids instead
of counties, to remove political boundaries.
For this task, you can use
the provided starter code:
https://colab.research.google.com/drive/
1GHx_i82Q-eYES8t9Szld1McSu9rpGpYa#scrollTo=Q60u01ncdbU3
.
Divide the entire area into grids of 0
.
1
×
0
.
1 degrees and calculate
P
(
E
1
, E
3
|
E
2
)
for each grid
. You can use a bounding area of:
•
Latitude: 38.7 to 39.8
•
Longitude: -77.3 to -76.0
Map your calculated conditional probabilities per grid.
Are your gridded
probabilities consistent with the probabilities per county found in part (d)?
Solution:
Please refer to the solution code in this link
https://colab.research.
google.com/drive/195ji32kiIlTetniYRuTB-JoitwecOb3I#scrollTo=vtwFixYKZsWt
.
(a) The total sample size of the dataset is
N
= 2079 bridges.
P
(
E
1
) =
# of bridges built before 1971
N
=
974
2079
≈
0
.
47
P
(
E
2
) =
# of bridges with traffic of 20K or more
N
=
749
2079
≈
0
.
36
P
(
E
3
) =
# of bridges with poor condition
N
=
98
2079
≈
0
.
047
(b) The total sample size of the bridges in ’Baltimore City’ is
N
B
= 340.
P
(
E
1
|
E
4
) =
# of bridges built before 1971 in Baltimore City
N
B
=
168
340
≈
0
.
49
P
(
E
2
|
E
4
) =
# of bridges with traffic of 20K or more in Baltimore City
N
B
=
155
340
≈
0
.
46
P
(
E
3
|
E
4
) =
# of bridges with poor condition in Baltimore City
N
B
=
28
340
≈
0
.
08
Page 8 of 10
CEE 373
Homework #2
Baltimore City, compared to the entire state of Maryland, has higher probabil-
ities of having bridges built before 1971 (
E
1
), bridges with high daily average
traffic (
E
2
), and bridges in ‘poor’ condition (
E
3
).
(c) From De Morgan’s Law, we know that
E
1
∪
E
2
=
E
1
∩
E
2
Therefore, (
E
1
∪
E
3
)
∩
(
E
2
∩
E
4
)
= (
E
1
∩
E
3
)
∩
(
E
2
∩
E
4
) (note:
E
=
E
)
The Venn Diagram from this compound event should look similar to this one:
The referenced area means ”The bridges in Baltimore City that were built
before 1971, have daily average traffic less than 20,000 cars, and are in ’Poor’
bridge condition.”
Calculating this out, we find all the bridges that describe this compound event
(see Solution Code). P((
E
1
∪
E
3
)
∩
(
E
2
∩
E
4
)) =
19
2079
≈
0.009
(d) There are six counties in the dataset.
For each county,
P
(
E
1
E
3
|
E
2
E
County
)
can be calculated, and we get the following (see Solution Code):
•
Anne Arundel County: 0
•
Baltimore County: 0.015
•
Baltimore City: 0.058
•
Carroll County: 0
•
Harford County: 0
•
Howard County: 0
’Baltimore City’ should receive the primary budget allocation, because it has
the largest probability of having these bridges.
Page 9 of 10
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
CEE 373
Homework #2
(e) For each grid,
P
(
E
1
E
3
|
E
2
E
grid
) can be calculated. Using the starter code, we
get the following map which shows the probability for each grid (in gray) and
the bridges for each county:
Figure 1: Map of spatial probabilities of each grid with bridges
The transition from gray to white in the colorbar illustrates that the darker
gray color represents a higher probability within the grid.
Spatial probability can vary depending on the scale. In this instance, Balti-
more County and Baltimore City exhibit a high probability.
This outcome
closely aligns with the findings in part d.
Page 10 of 10