You are on page 1of 12

Decision Tree Basics

Decision trees are used to select the best course of action in situations where you face uncertainty.
Many business decisions fall into this category. For example, a manufacturer must decide how much
inventory to build before knowing precisely what demand will be. A litigant must choose between
accepting an out-of-court settlement or risking a trial. A speculator must decide to buy an asset
before knowing if it can be sold for a profit.

In all of these cases, the decision-maker faces an unknown that seems to make it impossible to
choose the right option with any certainty. Although the decision-maker does not know what the
outcome of the unknown will be, he or she generally has some knowledge about what the possible
outcomes are and how likely each is to occur. This information can be used to select the option that
is most likely to yield favorable results. Decision trees make this type of analysis easy to apply.

Real Estate Example

You have the opportunity to purchase a piece of property for $200,000. If it can be rezoned for
business use, you will be able to resell the property for $250,000. You estimate that there is a 60%
chance that your rezone request will succeed. If it fails, you can dump the property for $170,000 or
you can choose to appeal the zoning board’s decision, which has only about a 10% chance of
success. Applying for the zoning change and appealing an unfavorable ruling will each cost $5,000.
Should you purchase the property?

Build the Tree

To solve this problem with DecisionPro, you first point to New in the File menu. This will give you a
list of templates you can use to begin your model. The templates are essentially blank models that
have all style and calculation options set properly.

There are three decision tree templates: Basic, Long Names, and Wizard. The Basic and Long
Names templates are the same except that the Long Names version uses comment fields in each
node to display the node name. Since there are restrictions on what characters can be used in a
name, using the comment field to hold names is more flexible. For example, Buy & Rezone is not a
legal node name because the ampersand is an operator. Using the Basic template, you will need to
name this node Buy and Rezone. Using the Long Names version, you can use any characters you
like, as well as duplicate node names. The Basic template requires each node name to be unique.
Duplicating node names often simplifies building your tree, but is generally bad practice because it
can lead to communication errors when discussing your tree with others. The primary disadvantage
to the Long Names template is that the analysis tools report results using node names, not node
comments. Unless you have a real need to use special characters in your node names, you are
better off using the Basic template.
The Wizard template is designed to be used with the Decision Tree Wizard tool, which guides you
through construction of a tree. This is a great tool for building small trees when you are not familiar
with DecisionPro. However, building trees directly using the Basic template is still the preferred
method.

Back to the example, after pointing to New in the File menu, click Decision Tree (basic). This will
open a model that looks like this:

The problem states that you have two options from which to choose: buy the property for $200,000
or do nothing. To reflect these options, double-click on the triangle following Root. This will bring
up the Insert Branch dialog box:

Next, click on the Decision Node button. This causes DecisionPro to add two additional branches
following Root.

DecisionPro automatically assigns the names Option1 and Option2 to the new branches. You
should use the more descriptive names Buy Property and Do Nothing. To make this change, click
on the text Option1 that appears in the tree and then type Buy Property followed by the ENTER
key. Repeat this process to rename Option2 to Do Nothing.

Note that you do not need to edit formulas in the Formula Bar. When building decision trees you
create new branches by double-clicking and you enter all input information by editing directly in the
tree. DecisionPro builds the required formulas for you automatically.

When you click on a node field, such as the node name, a dotted line appears around the field. If
you simply begin typing, the entire field is replaced with the new text you type. However, if you
click again on the field, it will turn into an edit box where you can change the existing field contents.
Clicking outside the field completes the edit.
Note: You do not double-click on a field to begin editing; instead, you click twice. Double-clicking
will cause the tree to page into the branch you selected. This will all make sense with a little
practice.

In this example, you have only two options from which to choose. However, if there were a third
option, you could add a third branch by double-clicking on the square following Root. Each time you
double-click on any branch symbol (circle, square, or triangle), a new branch is added. You can go

ahead and try this if you like--just click Undo to remove the branch when you are done.

If you buy the property, you will spend $200,000. To reflect this in the tree, click on the zero in the
Buy Property branch and enter -200000. Note that the incremental value you enter here is
negative because it is a cash outflow.

The Do Nothing branch is complete.

If you buy the property, you will next need to apply for a zoning change. To reflect this in the
model, double-click on the triangle following Buy Property and click Pass Through in the Insert
Branch dialog box.

As you probably expected, this inserted a new branch but its name and incremental value need to
be corrected as follows:

The problem states that there is a 60% chance that the rezone request will be approved. Therefore,
there is also a 40% chance that it will be denied. You reflect this situation in your tree by inserting
an event node. Again, double-click on the triangle following Request Rezone and then click Event
Node in the Insert Branch dialog box.

Just as before, edit the tree to include meaningful names. You also need to change the probabilities
on the Approved and Denied branches from 50%/50% to 60%/40%.

If the rezone request is approved, you will sell the property for $250,000. You can show this in the
tree by inserting a pass through node after Approved and enter an incremental value of 250000.

If the rezone request is denied you have a decision to make--appeal the zoning board’s decision
(which costs $5,000) or just dump the property for $170,000. Show this in the tree by inserting a
decision node following Denied.
The problem states that the appeal has only a 10% chance of success. You model this chance by
inserting an event node after appeal.

If the appeal succeeds, you will sell the property for $250,000; and, if it fails, you will dump the
property for $170,000. Note that you cannot use the node names Sell Property and Dump
Property because they have already been used. A common way to get around name conflicts is to
append a number to each name. For example, Sell Property 1, Sell Property 2, etc. This tree
uses the names Sell and Dump.

Calculate a Solution
Finally, to calculate a solution press the F9 key or click on the Recalculate toolbar button .

Once you have calculated a solution, you might want to set number formats by pointing to Node in

the Format menu and clicking Properties .

The values at the end nodes are the actual profit or loss that you will experience if you wind up at
each node. For example, if you choose to buy the property, request a rezone, the request is
approved, and you sell the property, you will earn $45000 (-200000 + -5000 + 0 + 250000).
DecisionPro calculates the end node values by accumulating all incremental values between Root
and each end node. After calculating the end node values, DecisionPro folds-back the tree to
calculate EMVs for each node.

Interpret Your Results

The final step is to interpret the results of the decision tree analysis. Buying the property has an
expected value of $14,200 vs. $0 for doing nothing. Therefore, if you are not adverse to risk, you
should purchase the property. Furthermore, if your rezone request is denied, you should appeal.

Keep in mind that you can never earn $14,200 on this investment; you will either earn $45,000,
$40,000, or lose $40,000. The expected value calculation implicitly assumes that you are not
adverse to risk. That is, individual gains or losses on investments like this are of no consequence to
you. This is true if you have a large amount of money and many investment opportunities. In other
cases, though, you should consider the range of outcomes as well as the expected values when
interpreting your results. Techniques for applying risk aversion are presented later in this chapter.

Choosing Event Probabilities

One important difference between the real estate and the coin toss examples is in where the event
probabilities came from. When you flip a coin, you know precisely what the possible outcome
probabilities are--50% heads and 50% tails. In the real estate example, however, the probabilities
are only estimates. We have assumed that there is a 60% chance that the rezone request will be
approved. Another person constructing the same model might come up with a different estimate.
Flipping a coin is truly a random event. That is, each time you repeat the event, you might get a
different outcome. However, no matter how many times you issue the rezone request, you should
get the same result (in theory). The probabilities you assign to this event represent your confidence
in predicting an outcome rather than the probability of the outcome occurring. This distinction is not
something you should be concerned about. Decision trees help you choose the best option given
whatever information you have. It is perfectly valid to use estimated outcome probabilities as was
done in this example.

Inventory Example

Assume you own a sporting goods store in a small community whose local college basketball team
has made it into the finals of the national championships. You are sure that if the local team wins
you will be able to sell a significant number of T-shirts proclaiming the school as the national
champion. Unfortunately, to have the shirts ready the day after the championship game, you will
have to order the shirts at least a week in advance--before you know if the local team will win. You
expect to sell between 2,000 and 10,000 shirts at $20 each. You can order the shirts for $7 each.
Any shirts you do not sell you can sell as scrap for $2 each. In addition, you estimate that there is a
60% chance of the local team winning. You must decide today if you will order any shirts, and if so,
how many.

In this problem you face two uncertain events, you don't know who will win the championship
game, and you don't know how many shirts you can sell even if the local team does win.

Here is a decision tree constructed to solve the T-shirt problem:


In the first node you face a decision. You must decide how many shirts to order. This example has
been simplified by assuming you can only order in quantities of 5,000. This means you must order
5,000, 10,000, or none at all.

Once you have made a decision about how many shirts to order, you next come to an event node--
the local team either wins or loses the championship. If the team loses, you must sell all of the
shirts as scrap losing either $25,000 if you order 5,000 shirts ($2*5,000-$7*5,000) or $50,000 if
you order 10,000 shirts ($2*10,000-$7*10,000). If the team wins, you face another uncertainty--
the demand for shirts.

The problem states that you expect demand to be between 2,000 and 10,000 shirts. A continuous,
uncertain quantity, like forecast sales, can be modeled using several techniques. The simplest
technique is to use three to five scenarios and assign a probability to each.

In the T-shirt example the range of expected demand was divided into four bands (2-4K, 4-6K, 6-
8K, and 8-10K) and the midpoint in each band (3K,5K,7K,9K) is chosen as the scenario's demand.
Of course, you cannot sell more shirts than you have. Therefore, if you order only 5,000 shirts, you
will make the same profit if demand is 5,000, 7,000 or 9,000. All shirts you have in excess of
demand can be sold as scrap.

The solution indicated by this tree is that you should order 5,000 shirts because this option yields
the highest expected value.

Node Formulas

Decision trees are a unique type of model in DecisionPro because you don’t have to enter a formula
in the Formula Bar. Instead, DecisionPro builds the formulas for you automatically. Despite this fact,
there are times when you will want to edit the formulas directly. For example, if you want to change
the order in which branches are drawn.

Decision trees contain four node types: decision, event, pass through, and end; each is described
below:

Decision Nodes

Decision nodes are constructed using the following formula:

NodeName := IncValue -> max( Option1, Option2 ,... )

For example, the root node in the real estate example looks like this:

Root:=0->max(Buy Property,Do Nothing)

You can have any number of options listed in the max statement. The order in which the options
are listed controls the order in which the branches are drawn.

Event Nodes

Event nodes have the following format:

NodeName := IncValue -> emv( P1, Outcome1, P2, Outcome2, ... )

For example, the node Request Rezone is defined as

Request Rezone:=-5000->emv(60%,Approved,40%,Denied)

Arguments in the emv statement are always supplied in pairs. The first argument in the pair is the
branch probability and the second argument is the branch name.

Pass Through Nodes

Pass through nodes have the format

NodeName := IncValue -> ( NextNodeName )


For example,

Buy Property:=-200000->(Request Rezone)

End Nodes

End nodes simply contain an incremental value using the syntax

NodeName := IncValue ->

For example,

Sell Property:=250000->

Decision Trees with Discounted Cash Flows

Usually, when you build a decision tree you assume that all events take place close enough together
that time value of money is not important. However, to be precise, you should replace each
incremental value with a present value. The easiest way to do this is to create your own discounting
function and use it in each incremental value entry.

Let’s modify the real estate tree to discount all cash flows by 7% per year. Furthermore, let’s
assume you purchase the property in year zero, and each rezone request takes a year. This means
you can sell the property in year one or two depending on if you appeal the zoning board’s decision.

You start with the following decision tree:

The first thing you will do is edit the -200000 in the Buy Property node and replace it with Pv(-

200000,0). Pv is a function that will be created later. It takes two arguments, the cash flow amount

and the year you encounter the cash flow.


Note that Pv now shows up as an undefined node. Select this node and enter the following formula:

Pv(cash,year):=cash/(1+Int)^year

Also, enter the following definition for the discount rate:

Int:=7%

With a little formatting change on the nodes Pv and Int, the tree now looks like this:

Since you don’t want the node Pv showing up every place you use it, you should make it a hidden
node. To do this, select Pv and then point to Node in the Format menu and click Hide Node. If
you later want to display Pv so that you can change it, just point to Node in the Format menu and
click Show Hidden Nodes.

After hiding Pv and using it in every incremental cash flow, you get the following tree:
One interesting thing to note is that applying time value of money to the real estate example
changed the outcome values enough that now the best option is to do nothing.

This example uses a custom function to calculate present values. Using a custom function instead of
a built in function allows you to enter the discount rate in the definition of Pv rather than have to
include it in each incremental value. Building your own discounting function also gives you the
opportunity to specify input data in any way you like. For example, instead of using the year values
0, 1, 2, etc., suppose you want to enter actual years such as 2002, 2003, 2004, etc. You can do this
simply by changing the definition of Pv from

Pv(cash,year):=cash/(1+Int)^year

to

Pv(cash,year):=cash/(1+Int)^(year-2002)

This will discount all values back to the year 2002.

The following possible definition for Pv accepts a list of annual cash flow values:

Pv(...):=npv(Int,arguments)

With this definition, an expression such as Pv(0,-100,-50) means there is a cash outflow of 100

and 50 in years one and two respectively.

You are free to choose any definition for Pv that best suits your analysis.

You might also like