Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 10

Directions

DecisionTree.xls

Page 1 of 10

DecisionTree.xls

Version 3.4 10/27/2007 Constructing a Decision Tree with Built-in Formulas John.O.McClain@cornell.edu Johnson Graduate School of Management Cornell University Ithaca NY 14853

This spreadsheet is intended for teaching purposes. You are welcome to use it in any manner, and change it as you see fit. This model comes without any guarantee whatsoever, and is distributed free of charge. A Decision Tree represents a series of decisions that are linked through time. That is, after one decision has been made, there may be any number of subsequent decisions. Moreover, the choices that are available for future decisions depend on past choices. A diagram is very helpful in keeping track of all of these details, and explaining the situation to others. The diagram below illustrates the three types of Nodes on a Decision Tree: Decision Nodes (Yellow), Probability Nodes (Blue) and Terminal Nodes (Gray). Node 1 is a Decision Node, which means that you may choose among the outgoing branches. The first choice would lead you to Node 2, where the payoff is 20. The second choice goes to Node 3, payoff 10. The third goes to Node 4, where the payoff is 10.4. (Explanation of this number is given below.) The word Yes appears on the first branch because it has the highest payoff. The word No appears on the other branches because their payoffs are lower. The number 20 appears in Node 1 because that is what you get if you follow the best branch.
Now Node 1 20 Yes No No Change Model Node 2 20 Node 3 10 Node 4 10.4 0.4 Node 5 -34 0.6 Node 6 40 Future

Nodes 2, 3, 5 and 6 are Terminal Nodes. Nothing follows from them. Each terminal node has a payoff, and you (the decision maker) have to enter these values. Node 4 is a Probability Node, which means that you CANNOT choose among the outgoing branches. Only one of the branches out of Node 4 will happen, and that is a matter of chance. The probability of the first branch is 0.4 (or 40%) and if it happens you will go to Node 5 and get a payoff of -34. (That is, you will lose 34.) The probability of the second branch is 0.6, leading to Node 6, payoff 40. You have to supply the probabilities for these branches. They must add to 1.0. The number 10.4 appears in Node 4. That is the Expected Value of the Payoff, which is a weighted average, using the probabilities as weights. In this case, 0.4(-34) + 0.6(40) = 10.4.

Directions

DecisionTree.xls

Page 2 of 10

How to Construct a Decision Tree


First, go to the "Tree" worksheet. All work must be done there. Link to Tree Worksheet Changes can be made in two ways: right-click on a cell, or click the "Change Model" button. If you want to delete whatever is currently on the Tree sheet and start a new tree, here is how: Click "Change Model" (or right-click on an empty cell) and choose Erase this Decision Tree and Build a New One If you want to change a branch assignment between two Nodes, right-click on either node. You cannot change a branch in any other way. You must do it from one of the nodes that it connects. You may, however, enter probabilities directly on branches that lead out of Probability Nodes. A Node can be changed or deleted by right-clicking on it. This includes: > Changing its "Type" (Decision, Probability or Terminal) > Changing its "Successors" (a node reached directly through an outgoing branch) > Changing its "Predecessor" (a node reached directly through an incoming branch) (at most one predecessor is possible for each node) > Deleting the node. Please Note: You can't modify the basic design by moving cells around or typing in new formulas. The entire model is re-written every time you use the right-click or the "Change Model" button.

Entering Data on a Decision Tree


There are only three kinds of Data that you enter on the Decision Tree: 1) Names for each Node. Each Node consists of two cells, side-by-side (solid color, with a border around both cells.) The left cell contains the name (see diagram below). You may change any or all names as you see fit. 2) Values for each Terminal Node. The right cell of Terminal nodes represent the payoffs at the end of the decisions. You must enter these values. Warning: DON'T change the right cells of Decision or Probability Nodes. They contain formulas. 3) Probabilities for each branch leading out of a Probability Node. You enter the probabilities. They are located under each branch, in the column that is just to the right of the corresponding Probability Node. Make sure they add up to 1.0 for each Probability Node.
Decision Node

Probability Node

Terminal Node

Now Node 1 20 Yes No No

Change Model Node 2 20 Node 3 10 Node 4 10.4 0.4 Node 5 -34 0.6 Node 6 40

Future

Probabilities

Directions

DecisionTree.xls

Page 3 of 10

Bng tnh ny l dnh cho mc ch ging dy. Bn c quyn s dng n trong bt c cch no, v thay i n nh bn thy ph hp. M hnh ny xut pht m khng m bo bt k no, v l phn phi min ph. Mt cy Quyt nh i din cho mt lot cc quyt nh c lin kt thng qua thi gian. l, sau mt quyt nh c thc hin, c th c bt k s lng cc quyt nh tip theo. Hn na, nhng la chn c sn cho cc quyt nh tng lai ph thuc vo s la chn qua. biu l rt hu ch trong vic theo di tt c nhng chi tit ny, v gii thch tnh hnh cho ngi khc. Biu di y minh ha ba loi cc nt trn mt cy Quyt nh: Quyt nh cc nt (vng), cc nt Xc Sut (Blue) v cc nt u cui (Gray). Node 1 l mt Node Quyt nh, c ngha l bn c th chn mt trong nhng ngnh i. Cc la chn u tin s dn bn n Nt 2, ni m tin chi tr l 20. S la chn th hai i n Nt 3, hon tr 10. th ba i n Nt 4, ni m tin chi tr l 10.4. (Gii thch v con s ny c a ra di y.) T C xut hin trn cc chi nhnh u tin bi v n c tin chi tr cao nht. T khng xut hin trn cc ngnh khc v tr lng ca h thp hn. S 20 xut hin trong Node 1 v l nhng g bn nhn c nu bn lm theo cc ngnh tt nht.

Cc nt 2, 3, 5 v 6 l cc nt Terminal. Khng c g sau t h. Mi nt u cui c tin chi tr, v bn (ngi ra quyt nh) phi nhp cc gi tr ny. Node 4 l mt Node xc sut, c ngha l bn KHNG chn gia cc ngnh gi i. Ch c mt trong cc ngnh trong Node 4 s xy ra, v l mt vn ca c hi. Xc sut ca cc chi nhnh u tin l 0,4 (hoc 40%) v nu n xy ra, bn s i n Node 5 v nhn c mt tin chi tr ca -34. (Tc l, bn s mt 34.) Xc sut ca chi nhnh th hai l 0,6, dn n 6 nt, hon tr 40. Bn phi cung cp cc xc sut cho cc chi nhnh ny. H phi thm vo 1.0. S 10,4 xut hin trong Node 4. l gi tr d kin ca tin chi tr, m l mt trng trung bnh, bng cch s dng cc xc sut l trng lng. Trong trng hp ny, 0,4 (-34) + 0,6 (40) = 10.4.

Directions

DecisionTree.xls

Page 4 of 10

Lm th no Xy dng mt cy quyt nh u tin, hy vo bng sheet "cy". Tt c phi c thc hin . Thay i c th c thc hin theo hai cch: nhp chut phi vo mt , hoc nhp vo nt "Thay i m hnh" . Nu bn mun xo bt c iu g nm trn sheet cy v bt u mt cy mi, y l cch: Nhp vo "Thay i m hnh" (hoc nhp chut phi vo mt trng) v chn Xo b Quyt nh cy ny v Xy dng mt New One Nu bn mun thay i mt giao ngnh gia hai Nodes, nhp chut phi vo nt hoc. Bn khng th thay i mt chi nhnh bt k cch no khc. Bn phi lm iu t mt trong cc nt m n kt ni. Bn c th, tuy nhin, xc sut nhp trc tip vo ngnh dn trong Nt xc xut. Mt Node c th c thay i hoc xa bng cch nhn chut vo n. iu ny bao gm: > Thay i "Type" ca n (Quyt nh, xc sut hoc u cui) > Thay i "tha k" ca n (mt nt t trc tip thng qua mt chi nhnh ra) > Thay i "tin nhim" ca n (mt nt t trc tip thng qua mt chi nhnh n) (t nht mt trong nhng ngi tin nhim c th cho mi node) > Xa cc nt. Lu : Bn khng th sa i thit k c s bng cch di chuyn cc t bo xung quanh hoc g vo cng thc mi. M hnh ton l vit li mi khi bn s dng kch chut phi hoc nt "Thay i m hnh". Nhp d liu trn mt cy quyt nh Ch c ba loi d liu m bn nhp vo cy Quyt nh: 1) Tn cho mi Node. Mi nt bao gm hai t bo, k st nhau (mu rn, vi mt ng vin chung quanh cc t bo.) Cc t bo cn cha tn (xem biu di y). Bn c th thay i tn bt k hoc tt c nh bn thy ph hp. 2) Gi tr cho mi Node Terminal. Cc t bo bn phi ca nt Terminal i din cho thng pht cui quyt nh. Bn phi nhp cc gi tr ny. Cnh bo: KHNG thay i cc t bo bn phi ca Quyt nh hoc cc nt xc sut . Chng cha cng thc. 3) xc sut i vi tng ngnh hng u trong mt Nt xc sut. Bn nhp vo xc sut. H c t theo tng ngnh, trong ct ch l bn phi Xc sut tng ng ca Node. Hy chc chn rng h thm n 1,0 cho mi Node xc sut.

Directions

DecisionTree.xls

Page 5 of 10

Directions

DecisionTree.xls

Page 6 of 10

y i m hnh" .

c nt m n kt ni.

o cng thc mi.

thy ph hp.

cha cng thc.

Tree

95516673.xls.ms_office

Page 7 of 10

Now Mua hng 90 Yes No No C.Hng C 89 0.7 0.3

Future C.Hng A 90 C.Hng B 80 t 95

Khng t 75

95516673.xls.ms_office, Warning, p. 8 of 10

WARNING: YOU NEED TO ENABLE THE MACROS IN THIS FILE


Try these steps. If step 1 does not work, then go to step 2. STEP 1: Try to enable the macros
For Excel 2007, A. If you see the Security Warning in your menu bar, proceed with step B. If the Security Warning is not there, go to STEP 2. In the Security Warning, Click Options. B. C. In the Alert Window that appears, click Enable This Content and click OK.

For Excel 2003, A. Close this file. Then open it again. B. In the window that appears, click Enable Macros. If a window like this one does NOT appear, then go to STEP 2.

STEP 2: If Step 1 does not work


If you DID NOT get a Security Message, then your security setting is too high. Here is what you should do: For Excel 2007, A. Click the Microsoft Office Button at the top-left of the screen: B. Click Excel Options. C. Click Trust Center, then Trust Center Settings, and then Macro Settings. D. Click Disable all macros with notification

95516673.xls.ms_office, Warning, p. 9 of 10 E. Exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit. F. Open this file again and follow the instructions in STEP 1 to enable the macros. For Excel 2003, A. On the menu bar at the top of this page, select Tools, then Macro, then Security. B. On the Security Level tab, select Medium and click OK. C. Then exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit. D. Open this file again and follow the instructions in STEP 1 to enable the macros.

95516673.xls.ms_office, Warning, p. 10 of 10

You might also like