2 - TreePlan 182 Guide
2 - TreePlan 182 Guide
Using TreePlan
16
16.1 TREEPLAN OVERVIEW
TreePlan is a decision tree add-in for Microsoft Excel 2003–2013 (Windows) and Microsoft Excel
2011 (Macintosh).
TreePlan helps you build a decision tree diagram in an Excel worksheet using dialog boxes.
Decision trees are useful for analyzing sequential decision problems under uncertainty. Your
decision tree model may include various controllable alternatives (e.g., whether to introduce a new
product, whether to bid on a new project) and uncontrollable uncertainties (e.g., possible demand
for a product, whether you're awarded a contract), arranged in chronological order. TreePlan
automatically includes formulas for summing cash flows to obtain outcome values and for
calculating rollback values for determining the optimal strategy.
To use TreePlan, you
(1) open a new worksheet,
(2) press Ctrl+Shift+T (or Options+Cmd+T) to build a new decision tree diagram,
(3) select a node to change the structure of your decision tree,
(4) enter branch names, cash flows, and probabilities, and
(5) determine the optimal strategy from TreePlan's results.
All of TreePlan’s functionality, including its built-in help, is a part of the TreePlan XLA file.
There is no separate setup file or help file. When you use TreePlan on a Windows computer, it
does not create any Windows Registry entries (although Excel may use such entries to keep track
of its add-ins).
th
he spreadsheet: begin your treee to the right of
o the area wheere your data iss stored, and ddo not
su
ubsequently ad
dd or delete rowws or columns in the tree-diag
agram area.)
Build up a tree by
b adding or modifying
m brancches or nodes iin the default trree. To changee the branch
laabels or probabbilities, click on
n the cell contaaining the labell or probabilityy and type the nnew label
orr probability. To
T modify the structure
s of thee tree (e.g., addd or delete brannches or nodes in the
tree), select the node
n or the celll containing th
he node in the ttree to modify,, and press Ctrrl+Shift+T
(oor Options+Cm md+T). TreePllan will then prresent a dialogg box showing tthe available ccommands.
Fo or example, to add an event node
n to the top branch of the tree shown aboove, select the square cell
o the vertical line at the end of
(ccell G4) next to o a terminal brranch and presss Ctrl+Shift+T T (or
Options+Cmd+
O +T). TreePlan then
t presents th
his dialog box..
To add an eventt node to the brranch, we channge the selectedd terminal nodee to an event nnode by
seelecting Chang
ge to event nod de in the dialog
g box, selectinng the number oof branches (heere two),
annd pressing OK
K. TreePlan theen redraws the tree with a chaance node in pplace of the term minal node.
16.2
2 Building a Deci
cision Tree in Tre
eePlan 185
You
Y can then fo ormat all of the probabilities simultaneously
s y using Excel's formatting commmands.
(B
Because of limitations in Excel, the Select dialog
d box mayy not be availabble when workking with
veery large trees.)
16.3 ANAT
TOMY OF
F A TREE
EPLAN DE
ECISION TREE
An
A example of a TreePlan deccision tree is sh hown below. Inn the example, a firm must deecide (1)
whether
w to prepaare a proposal for a possible contract
c and (22) which methood to use to sattisfy the
co
ontract. The treee consists of decision
d nodes,, event nodes aand terminal noodes connectedd by
brranches. Each branch
b is surro
ounded by cellss containing foormulas, cell reeferences, or lab
abels
peertaining to thaat branch. You may edit the laabels, probabillities, and partiial cash flows aassociated
with
w each branch h. The partial cash
c flows are the amount thee firm "gets paaid" to go downn that
brranch. For the scenario with terminal
t value $30,000, the fi
firm pays $50,0000 if it decidees to
prrepare the propposal, receives $250,000 up front
fr if awardedd the contract, spends $50,0000 to try the
ellectronic metho od, and spends $120,000 on thet mechanicall method if the electronic metthod fails.
Decision Node
Rollback Value
Decision Node
Choice Indicator
DriveTek Problem
DriveTek Research Institute discovers that a computer company wants a new storage device for a
proposed new computer system. Since the computer company does not have research people
available to develop the new storage device, it will subcontract the development to an independent
research firm. The computer company has offered a fee of $250,000 for the best proposal for
developing the new storage device. The contract will go to the firm with the best technical plan
and the highest reputation for technical competence.
DriveTek Research Institute wants to enter the competition. Management estimates a cost of
$50,000 to prepare a proposal with a fifty-fifty chance of winning the contract.
However, DriveTek's engineers are not sure about how they will develop the storage device if they
are awarded the contract. Three alternative approaches can be tried. The first approach is a
mechanical method with a cost of $120,000, and the engineers are certain they can develop a
successful model with this approach. A second approach involves electronic components. The
engineers estimate that the electronic approach will cost only $50,000 to develop a model of the
storage device, but with only a 50 percent chance of satisfactory results. A third approach uses
magnetic components; this costs $80,000, with a 70 percent chance of success.
DriveTek Research can work on only one approach at a time and has time to try only two
approaches. If it tries either the magnetic or electronic method and the attempt fails, the second
choice must be the mechanical method to guarantee a successful model.
The management of DriveTek Research needs help in incorporating this information into a
decision to proceed or not.
[Source: The storage device example is adapted from Spurr and Bonini, Statistical Analysis for
Business Decisions, Irwin.]
In general, decision nodes and branches represent the controllable factors in a decision problem;
event nodes and branches represent uncontrollable factors.
Decision nodes and event nodes are arranged in order of subjective chronology. For example, the
position of an event node corresponds to the time when the decision maker learns the outcome of
the event (not necessarily when the event occurs).
The third kind of node is a terminal node, representing the final result of a combination of
decisions and events. Terminal nodes are the endpoints of a decision tree, shown as the end of a
branch on hand-drawn diagrams and as a triangle on computer-generated diagrams.
The following table shows the three kinds of nodes and two kinds of branches used to represent a
decision tree.
Terminal Values
Each terminal node has an associated terminal value, sometimes called a payoff value, outcome
value, or endpoint value. Each terminal value measures the result of a scenario: the sequence of
decisions and events on a unique path leading from the initial decision node to a specific terminal
node.
To determine the terminal value, one approach assigns a cash flow value to each decision branch
and event branch and then sum the cash flow values on the branches leading to a terminal node to
determine the terminal value. In the DriveTek problem, there are distinct cash flows associated
with many of the decision and event branches. Some problems require a more elaborate value
model to determine the terminal values.
The following diagram shows the arrangement of branch names, probabilities, and cash flow
values on an unsolved tree.
16.5 Step-by-S
Step TreePlan Tu
Tutorial 191
5
0.5
Ele
ectronic success
$150,000
0.5 Try electronic
c method
Awarded contract
0.5
5
Ele
ectronic failure
$30,000
0.7
7
Maagnetic success
Prepare propo
osal $120,000
Try magnetic
c method
0.3
3
Maagnetic failure
$0
0.5
Nott awarded contract
-$50,000
Building
B the
e Tree Diag
gram
1. Start with
w a new work ksheet. (If no workbook
w is oppen, choose Fille | New. If a w
workbook is
open, choose
c Insert | Worksheet.)
W
2. Select cell
c A1. In Exccel 2007 & 201 10 & 2013, chooose Add-ins | Decision Treee; in Excel
2003 & 2011, choosee Tools | Decisiion Tree. Or, inn any Window
ws version, presss
Ctrl+Shhift+T. In Macc Excel 2011, press
p Options++Cmd+T. Subseequent instructtions refer
only to
o the Windows shortcut key. In
I the TreePlann New Tree diaalog box, clickk the New
Tree buutton. A decisio
on node with tw
wo branches ap
appears.
Figure 16.12 In
nitial Decision Tree
T Diagram
A B C D E F G
1
2 Alternative 1
3 0
4 0 0
5 1
6 0
7 Alternative 2
8 0
9 0 0
3. Select cell
c D2, and en nter Prepare proposal.
p Selecct cell D4, and enter –50000. Select cell
D7, andd enter Don't prepare
p propo
osal.
4. Select cell
c F3. Press Ctrl+Shift+T.
C In
I the TreePlann Terminal Node dialog box, select
Changee To Event Node, select Two
o Branches, andd click OK. Thhe tree is redraw
wn.
5. Select cell H2, and enter Awarded contract. Select cell H4, and enter 250000. Select cell
H7, and enter Not awarded contract.
6. Select cell J3. Press Ctrl+Shift+T. In the TreePlan Terminal Node dialog box, select
Change To Decision Node, select Three Branches, and click OK. The tree is redrawn.
194 Chapter 16 Decision Trees Using TreePlan
7. Select cell L2, and enter Use mechanical method. Select cell L4, and enter –120000.
Select cell L7, and enter Try electronic method. Select cell L9, and enter –50000. Select
cell L12, and enter Try magnetic method. Select cell L14, and enter –80000.
Figure 16.18 Subsequent Decision Branches With Names and Cash Flows
A B C D E F G H I J K L M N O
1
2 Use mechanical method
3 80000
4 -120000 80000
5
6 0.5
7 Awarded contract Try electronic method
8 2 150000
9 250000 150000 -50000 150000
10
11
12 Prepare proposal Try magnetic method
13 120000
14 -50000 50000 -80000 120000
15
16 0.5
17 Not awarded contract
18 1 -50000
19 50000 0 -50000
20
21
22 Don't prepare proposal
23 0
24 0 0
8. Select cell N8. Press Ctrl+Shift+T. In the TreePlan Terminal Node dialog box, select
Change To Event Node, select Two Branches, and click OK. The tree is redrawn.
16.5 Step-by-Step TreePlan Tutorial 195
9. Select cell P7, and enter Electronic success. Select cell P12, and enter Electronic
failure. Select cell P14, and enter –120000.
Figure 16.20 Branch Names and Cash Flows for Electronic Method Uncertainty
A B C D E F G H I J K L M N O P Q R S
1
2 Use mechanical method
3 80000
4 -120000 80000
5
6 0.5
7 Electronic success
8 0.5 150000
9 Awarded contract Try electronic method 0 150000
10 3
11 250000 120000 -50000 90000 0.5
12 Electronic failure
13 30000
14 -120000 30000
15 Prepare proposal
16
17 -50000 35000 Try magnetic method
18 120000
19 -80000 120000
20
21 0.5
22 1 Not awarded contract
23 35000 -50000
24 0 -50000
25
26
27 Don't prepare proposal
28 0
29 0 0
10. Select cell N18. Press Ctrl+Shift+T. In the TreePlan Terminal Node dialog box, select
Change To Event Node, select Two Branches, and click OK. The tree is redrawn.
196 Chapter 16 Decision Trees Using TreePlan
11. Select cell P16, and enter .7. Select cell P17, and enter Magnetic success. Select cell
P21, and enter .3. Select cell P22, and enter Magnetic failure. Select cell P24, and enter
–120000.
16.5 Step-by-Step TreePlan Tutorial 197
12. Double-click the sheet tab (or right-click the sheet tab and choose Rename from the
shortcut menu), and enter Original. Save the workbook.
TreePlan put the formula =SUM(P14,L11,H12,D20) into cell S13 for determining the terminal
value.
Other formulas, called rollback formulas, are in cells below and to the left of each node. These
formulas are used to determine the optimal choice at each decision node.
In cell B26, a formula displays 1, indicating that the first branch is the optimal choice. Thus, the
initial choice is to prepare the proposal. In cell J11, a formula displays 2, indicating that the
19
98 Chapter 16
6 Decision Trees Using TreePlan
Formatting
F the Tree Diagram
D
Th
he following stteps show how
w to use TreePlan and Excel ffeatures to form
mat the tree diaagram. You
may
m choose to use
u other formaats for your ow
wn tree diagram
ms.
13. From th o Copy Sheet (or right-clickk the sheet tab aand choose
he Edit menu, choose Move or
Move Or
O Copy from the shortcut menu).
m In the lowwer left cornerr of the Move O
Or Copy
dialog box,
b check thee Create A Coppy box, and clicck OK.
14. On sheeet Original (2), if the probabiilities are not leeft-aligned, sellect cell H9. Prress
Ctrl+Shhift+T. In the TreePlan
T Selecct dialog box, vverify that the ooption button ffor Cells
with Prrobabilities is selected,
s and cllick OK. With all probabilityy cells selected,, click the
Align Left
L button.
Figure 16.25 Ex
xcel Format Ceells Dialog Box
x
16. c I12. Press Ctrl+Shift+T. In the TreePlaan Select dialogg box, verify thhat the
Select cell
option button for Cellls with Rollbacck EVs/CEs is selected, and cclick OK. Withh all
rollback cells selected mat | Cells. Reppeat the Currenncy formatting of step 16
d, choose Form
above.
17. Select cell
c S3. Press Ctrl+Shift+T.
C In
I the TreePlann Select dialogg box, verify thhat the
option button for Cellls with Termin
nal Values is seelected, and cliick OK. With aall terminal
value cells
c selected, choose
c Format | Cells. Repeatt the Currencyy formatting of step 16
above.
200 Chapter 16 Decision Trees Using TreePlan
18. Double-click the Original (2) sheet tab (or right-click the sheet tab and choose Rename
from the shortcut menu), and enter Formatted. Save the workbook.
Figure 16.27 Ex
xcel Format Ceells Dialog Box
x
Explanation: A custom numbeer format has fo our sections off format codes. The sections aare
seeparated by sem micolons, and they
t define thee formats for poositive numberrs, negative num mbers, zero
vaalues, and text,, in that order. When you speecify three sem micolons withouut format codess, Excel
dooes not displayy positive numb bers, negative numbers,
n zero values, or textt. The formula remains in
th
he cell, but its result
r is not dissplayed. Later, if you want too display the reesult, you can cchange the
fo
ormat without having
h to enterr the formula again. Editing aan existing form mat does not deelete it. All
fo
ormats are saveed with the worrkbook unless you explicitly delete a formaat.
21. c A27. Presss Ctrl+Shift+T. In the TreePllan Select dialoog box, verify tthat the
Select cell
option button for Cellls with Rollbacck EVs/CEs is selected, and cclick OK. Withh all
rollback values selectted, choose Forrmat | Cells | N
Number or Hom me | Format | Format Cells
| Numbber. In the Cateegory list box, select Custom.. Scroll to the bbottom of the T
Type list
box, an
nd select the thrree-semicolon entry. Click O OK.
22. Doublee-click the Form
matted (2) sheeet tab (or right--click the sheett tab and choosse Rename
from th
he shortcut mennu), and enter Model
M Inputs . Save the worrkbook.
Printing
P the
e Tree Diag
gram
23. In the Name
N Box list box, select TreeeDiagram (or select cells A11:S34).
24. To prinnt the tree diagrram from Exceel, with the treee diagram rangge selected, in EExcel 2003,
choose File | Print Arrea | Set Print Area;
A in Excel 22007 & 2010 & 2013, choosee Page
Layoutt | Print Area | Set
S Print Area.. In Excel 20033 and earlier, chhoose File | Paage Setup;
in Exceel 2007 & 2010 0 & 2013, choo ose Office Buttton or File | Prrint Preview | P
Page Setup.
In the Page
P Setup diaalog box, click the Page tab; ffor Orientationn click the optioon button
for Lanndscape, and fo k the option buutton for Fit Too 1 Page Wide By 1 Page
or Scaling click
Tall. Click the Headeer/Footer tab; inn the Header liist box select N
None, and in thhe Footer
list box
x select None (or select other appropriate heeaders and footters). Click thee Sheet tab;
202 Chapter 16 Decision Trees Using TreePlan
clear the check box for Gridlines, and clear the check box for Row And Column
Headings. Click OK. Choose File | Print and click OK.
25. To print the tree diagram from Word, clear the check boxes for Gridlines and for Row
And Column Headings on Excel’s Page Setup dialog box Sheet tab. Select the tree
diagram range. In Excel 2003, hold down the Shift key and from the Edit menu choose
Copy Picture. In Excel 2007 & 2010 & 2013, choose Home | Paste | As Picture | Copy as
Picture. In the Copy Picture dialog box, click the option button As Shown When Printed,
and click OK. In Word select the location where you want to paste the tree diagram and
choose Edit | Paste.
0.5
Electronic success
$150,000
0.5 Try electronic method $0
Awarded contract
-$50,000 0.5
$250,000 Electronic failure
$30,000
-$120,000
0.7
Magnetic success
Prepare proposal $120,000
Try magnetic method $0
-$50,000
-$80,000 0.3
Magnetic failure
$0
-$120,000
0.5
Not awarded contract
-$50,000
$0
Alternative Model
If you want to emphasize that the time constraint forces DriveTek to use the mechanical approach
if they try either of the uncertain approaches and experience a failure, you can change the terminal
nodes in cells R13 and R23 to decision nodes, each with a single branch.
16.6 Exponentiial Utility and Tre
eePlan 203
0.5
Electronic success
$150,000
0.5 Try electronic method $0
Awaarded contract
-$50,000 0.5
$250
0,000 Electronic failure Use mechanical method
1 $30,000
$0 -$120,000
0.7
Magnetic success
Prepare proposal $120,000
Try magnetic method $0
0
-$50,000
-$80,000 0.3
Magnetic failure Use mechanical method
1 $0
$0 -$120,000
0.5
Not awarded contract
-$50,000
$0
Don't pre
epare proposal
$0
$0
16.6 EXPO
ONENTIA
AL UTILITY
Y AND TR
REEPLAN
N
TrreePlan's defau ult is to rollbacck the tree using expected vallue (probabilityy-weighted aveerage) at an
ev
vent node and maximum
m of successor valuees at a decisionn node. If you cchoose to use eexponential
uttilities in TreeP
Plan's Options dialog box, TrreePlan will reddraw the decisiion tree diagram m with
fo
ormulas for com mputing the utiility and certain n equivalent att each node.
or the Maximizze option with exponential uttility, the rollbaack formulas aare U = A–B*E
Fo EXP(X/RT)
nd CE = -LN((A-EU)/B)*RT
an T, where X and EU are cell reeferences. For tthe Minimize ooption with
ex
xponential utiliity, the formulaas are U = A-B
B*EXP(X/RT) and CE = LN(((A-EU)/B)*RT T.
TrreePlan uses th r tolerance pparameter of thhe exponential utility
he name RT to represent the risk
fu
unction. The naames A and B determine
d scaling. If the nam mes A, B, and R RT don't exist oon the
worksheet
w when o use exponenttial utility, theyy are initially ddefined as A=1, B=1, and
n you choose to
RT=999999999
R 999. You can change
c the valu
ues of the nam mes using the Innsert | Name | D Define
co
ommand.
204 Chapter 16 Decision Trees Using TreePlan
16.7 ACKNOWLEDGEMENT
TreePlan was developed by Professor Michael R. Middleton at the University of San Francisco
(using the Excel 4 XLM macro programming language) and modified for use at Fuqua (Duke
University) by Professor James E. Smith. Mike Middleton rewrote portions using VBA during
2008-2013.