Title: Example 3a: Simple decision tree
1Example 3a Simple decision tree
You will be manufacturing a product (Lotus) and
you are deciding on whichtechnology to use B1
(welded steel) or B2 (aluminum). We assume there
are no other design decision you need to
consider. There is the constant utility (c net
profit sales cost) for each technology as
shown in slide 3. There is a negative utility
(u1 repair cost) if the technology fails. This
is different for the upper and lower branches of
the tree. The tree is the cost and revenue for a
single car. Later we will explain how to modify
the results for n cars.
2Example 3a Simple decision tree
You know the probability that the aluminum will
fail is 2. You are not certain about the welded
steel. There are two hypotheses about the
welds H0 (null hypothesis) P fail H0
failure prob if you believe H0 22 H1
(alternate hypothesis) P fail H1
failure prob if you believe H1 2 Welders
claim that H1 is valid because their welding
methods have improved. You assign the
probabilities P H0 30 and P H1 70.
In other words, you are 70 certain that the
welders are correct. You can compute the
probability of failure for the welded steel using
the Theorem of Total Probability P fail
P fail H0 P H0 P fail H1 P H1
0.22 (0.3) 0.02
(0.7) 8 This probability appears as p1
on the top branch of the decision tree on
the next slide.
3Example 3a Simple decision tree
The decision tree shows that the net profit from
selling steel (c 2.2K) is slightly higher than
aluminum (c 2K). But there is a higher
probability of failure for the steel frame (8
for steel versus only 2 for aluminum). The end
result is that the expected utilities are the
same.
fail, p1 0.08 u1 -4
c 2.2 u1 -4
Eu 1.88
steel, 2.2
not fail, p2 0.92
u2 0
indifferent decisions
same expected utility
NT
fail, p1 0.02 u1 -6
c 2 u1 -6
aluminum, 2.0
Eu 1.88
not fail, p2 0.98
u2 0
NT no test ACTION STATE FIXED
COST (c) E UTILITY
and
UTILITIES (uj) c u1p1 u2p2
4Example 3b Bayes analysis of tests
You would like to update your estimate of the
probablity of failure of welded steel. We will
take a frame and test it in a laboratory. The
lab result is fail (F) or not fail (N). We use
Bayes Theorem to find the new probability of
failure.
We begin with a chart of the probabilities of the
lab result. The probabilities are the same as
the top of slide 2. (Remember the probabilities
in each column add to one.) We do not know the
test result at this moment, but we will still
draw the rest of the tree and put all possible
test results on the tree. We already know
the probability of failure before the test
result P F 8 (see slide 2). Next, we need
to figure out the probabilities of failure after
the test result. We have to figure this out for
both test results (F and N).
5Example 3b Bayes analysis of tests
IF THE TEST RESULT IS FAIL (F) Then the new
probability of H1 is P H1 F P F H1
P H1 / P F 0.02 (0.7) / 0.08
0.175 This means that, after the test frame
failed, the credibility of the welders is reduced
and instead of 70 belief, you only have 17.5
belief.
IF THE TEST RESULT IS NOT FAIL (N) Then the new
probability of H1 is P H1 N P N H1
P H1 / P N 0.98 (0.7) / 0.92
0.746 This means that, after the test frame did
not fail, the credibility of the welders is
increased and instead of 70 belief, you have
74.6 belief. If we compare the two equations
above, we see there are two complements P not
fail H1 0.02 is the complement of P fail
H1 0.98 and P not fail 0.92 is the
complement of P fail 0.08. It is important
to note that P H1 fail and P H1 not fail
are not complementary events. They are both
the probabililty that the welders are right. The
difference is the test result.
6Example 3b Bayes analysis of tests
We are now ready to update the probability that
the car frame will fail. (This is for the cars
that you will sell, not the car frame tested in
the lab.) This probability will is determined
just like in slide 2, except with the updated
probabilities of the two hypotheses, H1 and H2.
The result will depend on the lab test result IF
THE TEST RESULT IS FAIL (F) From the preceding
slide, we have P H1 0.175 and P H0
0.825 (complement) P fail P fail H0
P H0 P fail H1 P H1 0.22
(0.825) 0.02 (0.175) 18.5 As
expected, the probability of failure has
increased from 8 (see slide 2).
IF THE TEST RESULT IS NOT FAIL (N) From the
preceding slide, we have P H1 0.746 and P
H0 0.254 P fail P fail H0 P H0
P fail H1 P H1 0.22
(0.254) 0.02 (0.746) 7.1 In
this case, the probability of failure has
decreased slightly from 8.
7Example 3b Bayes analysis of tests
Now we return to the decision tree in slide 3.
At the far left, however, we replace NT (no test)
by either F (fail in test lab) or N (not fail in
test lab). For each test result, we fill out the
rest of the tree with probabilities from the
preceding two slides. The optimal decisions are
intuitively clear below it is shown that if the
frame failed in the lab, you have less belief
that the steel is as good as aluminum, and you go
for the aluminum.
fail, p1 0.185 u1 -4
c 2.2 u1 -4
Eu 1.46
steel, 2.2
not fail, p2 0.815
u2 0
F
optimal decision
higher expected utility
(no need to recalculate this branch, the
expected utility is the same as slide 3)
aluminum, 2.0
Eu 1.88
F fail in lab ACTION STATE
FIXED COST (c) E UTILITY
and UTILITIES (uj) c u1p1 u2p2
8Example 3b Bayes analysis of tests
The tree below is for the case that the frame in
the lab did not fail. The optimal decision is
intuitively clear you have increased belief that
the steel is as good as aluminum, and you go for
the steel.
fail, p1 0.071 u1 -4
c 2.2 u1 -4
Eu 1.92
steel, 2.2
higher expected utility
not fail, p2 0.929
optimal decision
u2 0
N
aluminum, 2.0
Eu 1.88
N not fail ACTION STATE
FIXED COST (c) E UTILITY in lab
and UTILITIES (uj) c u1p1 u2p2
9Example 3b Bayes analysis of tests
We are now ready to include one more decision and
one more cost in our decision problem We have
to decide whether it is worthwhile to pay for the
test and we have to include ct, the cost of the
test. If you decide to pay for the test, then ct
is a fixed cost. The tree is shown below
test result use aluminum is fail
in cars you p1 0.08 manufacture
-ct Eu1 1.88
F
Eu 1.91 - ct
test
optimal decision
test result use steel is not fail p2 0.92
Eu2 1.92
N
higher expected value if ct lt .03
no test
NT
Eu 1.88
ACTION 1 STATE
ACTION 2 EXPECTED UTILITY test or no test
test result steel/aluminum Eu
-ct u1p1 u2p2
10Example 3b Summary for a single car
The tree on the preceding slide is pruned by
removing the branches for the states. This makes
the decision process clearer. Below it can be
seen that the first decision is to either test or
not test. If the cost of the test ct is less
than 0.03K (30 dollars) then the optimal
decision is to do the test. After you test, you
have to go to the preceding slide to figure out
your second decision. The result was if the
test result was fail, use aluminum, otherwise use
steel.
test
Eu 1.91K - ct
T
optimal decision if ct lt 0.03K
no test
Eu 1.88K
NT
ACTION 1 EXPECTED UTILITY (1 car)
11Example 3b Comments
Looking at the tree on slide 9, you will notice
that If you decide to test, and if the test
result is fail, then the expected utility
(average revenue) is 1.88-ct. In other words,
you are worse off than if you didnt test at all
(the expected utility without testing is 1.88).
But you must remember that the probability that
the test result is fail is only 8 (see slide 9).
There is a 92 the test result is not fail, and
the expected utility would be 1.92. Before the
test, you are not sure whether the test result is
fail or not fail, so we use the expected utility,
which is essentially a weighted average, with 8
weight on 1.88-ct and a 92 weight on 1.92. The
result is 1.91-ct as shown below and on slide 9.
test
Eu 1.91K - ct
T
optimal decision if ct lt 0.03K
no test
Eu 1.88K
NT
ACTION 1 EXPECTED UTILITY (1 car)
12Example 3c Analayis of 1000 cars
You may wonder why we go through this trouble
because the cost of a test will certainly be more
than 30. In other words, it is definitely not
worth doing the test. In manufacturing, however,
we will make many more than a single car.
Suppose we will make 1000 cars. Then we will
multiply almost every utility in the preceding
slides by 1000. For example, without a test, the
average revenue (expected utility) for
manufacturing, selling, and possibly repairing a
single car is 1,880. But if we make and sell
1000 cars, the average revenue would be
1,880,000. The cost of the test, however, is
not multiplied by 1000, because we will only do
the test once. We will do the same decision as
before manufacture all 1000 cars using aluminum
if this single test result is fail and use steel
if the result is not fail. Therefore, in the
expected utility we would only need to subtract
the cost of a single test, ct. This is shown on
the next page.
13Example 3c Analysis of 1000 cars and n cars
Below is the tree where the average revenue
(expected utility) of manufacturing, selling and
possibly repairing 1000 cars is given and the
cost of a single test is subtracted. Now it can
be seen that it is worthwhile to do the test if
the cost of the test is less than 30,000. In
general, for n cars, the expected utility is
found by replacing 1000 by n. This is also shown
below
expected utility for n 1000
expected utility for general n
test
Eu 1910K - ct
T
Eu n x (1.91K) - ct
optimal decision if ct lt 30K
optimal decision if ct lt n x (0.03K)
no test
Eu 1880K
NT
Eu n x (1.88K)
ACTION 1
14HW 7, Problem 1 Simple decision tree
The decision tree is below. The probabilities
are determined used the Theorem of Total
Probability, as shown in slide 2. The actions
and states are ???
?, p1 ? u1 ?
c ? u1 ?
Eu ?
?
?, p2 ?
u2 ?
indifferent decisions
same expected utility
NT
?, p1 ? u1 ?
c ? u1 ?
?
Eu ?
?, p2 ?
u2 ?
NT no test ACTION 2 STATE 2 FIXED
COST (c) E UTILITY
and
UTILITIES (uj) c u1p1 u2p2
15HW 7, Problem 1 Bayes analysis of tests
You would like to update your estimate of the
probablities.
We begin with a chart of the probabilities of the
test result. We do not know the test result at
this moment, but we will still draw the rest of
the tree and put all possible test results on the
tree. We already know the probability of test
result A before the test result P A
? Next, we need to figure out the probabilities
of A after the test result. We have to figure
this out for both test results. We use Bayes
Theorem and the Theorem of Total Probability, as
explained in slides 5 and 6.
16HW 7, Problem 1 Bayes analysis of tests
Now we return to the decision tree in slide 3.
At the far left, however, we replace NT (no test)
by either ? or ?. For each test result, we fill
out the rest of the tree with probabilities from
the preceding slides. The optimal decisions are
intuitively clear
?, p1 ? u1 ?
c ? u1 ?
Eu ?
?
?, p2 ?
u2 ?
?
optimal decision
higher expected utility
(no need to recalculate this branch, the
expected utility is the same as before)
?
Eu ?
? test result ACTION 2 STATE 2 FIXED
COST (c) E UTILITY
and
UTILITIES (uj) c u1p1 u2p2
17HW 7, Problem 1 Bayes analysis of tests
The tree below is for the case
?, p1 ? u1 ?
c ? u1 ?
Eu ?
?
higher expected utility
?, p2 ?
u2 ?
optimal decision
?
(no need to recalculate this branch, the
expected utility is the same as before)
?
Eu ?
? test result ACTION 2 STATE 2 FIXED
COST (c) E UTILITY
and
UTILITIES (uj) c u1p1 u2p2
18HW 7, Problem 1 Bayes analysis of tests
We are now ready to include one more decision and
one more cost in our decision problem We have
to decide whether it is worthwhile to pay for the
test and we have to include ct, the cost of the
test. If you decide to pay for the test, then ct
is a fixed cost. The tree is shown below
test result is ? p1 ?
-ct Eu1 ?
F
Eu ? - ct
test
optimal decision
test result is ? p2 ?
Eu2 ?
N
higher expected value if ct lt ?
no test
NT
Eu ?
ACTION 1 STATE 1
ACTION 2 EXPECTED UTILITY test or no test
test result ?
Eu -ct u1p1 u2p2
19HW 7, Problem 1 Summary for selling one item
The tree on the preceding slide is pruned by
removing the branches for the states. This makes
the decision process clearer. Below it can be
seen that the first decision is to either test or
not test. If the cost of the test ct is less
than ? then the optimal decision is to do the
test. After you test, you have to go to the
preceding slide to figure out your second
decision. The result was
test
Eu ? - ct
T
optimal decision if ct lt ?
no test
Eu ?
NT
ACTION 1 EXPECTED UTILITY (1 item)
20HW 7, Problem 1 ? items and n items
Below is the tree where the average revenue
(expected utility) of ? items and n items.
optimal decision if ct lt ?
optimal decision if ct lt n x (?)
test
Eu ? - ct
T
Eu n x (?) - ct
no test
Eu ?
NT
Eu n x (?)
ACTION 1 EXPECTED UTILITY (? items)
(n items)