# Decision Tree Elements

SpiceLogic Decision Tree software lets you create a sophisticated decision tree model using the following elements.

### Decision Node

A Decision Node is a node that represents a decision that needs to be made. A decision node can contain many "Action" nodes. An action node represents an action that a decision-maker can take.

A decision node is represented by a square symbol like this:

With some action nodes, A decision node can be shown like this.

In Decision Tree Software, you can create a Decision tree with a Decision Node as the root node by clicking the Decision button from the start screen as shown below.

A Decision node can be added to an Action or an event node as well. We will introduce the event node type on this documentation page. Decision Tree software shows a flyover menu when a node is selected within a tree. The flyover menu shows only the valid children types that can be added to that node. For example, a decision node can contain only the Action node. But an Action node can contain one Decision Node or one Chance node. Here is an example screenshot showing a flyover menu for a decision node.

Once actions are added to a Decision Node, the Decision Maker can add a Decision Node to an Action node, like this:

So, the tooltips on the flyover menu button will explain the function of that button.

Once you add a node, you can double click on that node to edit the text, as shown below. Once edited, hit the ENTER key to commit the change, or hit the ESC key to cancel the change.

### Chance Node

A chance node represents uncertainty. It is a random variable that can have several states, also known as events. The chance node is represented by a circle as shown below.

With some states/events, a Chance node may look like this:

In the flyover menu (when selected), a Chance node shows options to add Events as shown below.

You can add a chance node on any Action Node or Event an Event node from the flyover menu as shown below.

You can also use a Chance node as a root node, which is not a traditional use of a decision tree, but SpiceLogic Decision Tree Software supports such extension so that you can model a Cause and Effect tree like this:

In order to use the Chance node as a root node, you can click the "Chance node" button from the Start page as shown below.

In the Decision Tree software, you can easily convert a decision node to a chance node and a chance node to the decision node. So, if you have created a Decision node as the root node, you can simply right-click on that Decision node and choose the option "Convert to Chance node" from the context menu.

### Setting probabilities

A chance node contains multiple event nodes and each event is associated with a probability value. When you first create a chance node and add an event, you won't see the probability value, because, the events are considered mutually exclusive and collectively exhaustive, the probability of a single event must be 1 all the time.

Once you add another event to a chance node, you will see '?' shown on the edge.

So, basically, when you do not specify any probability for an event node, the decision tree software will follow the principle of indifference. According to the principle of indifference, if there is no reason to believe that one event is more probable than another event then all events can be assumed to be of equal probabilities. So, according to that logic, there are two events, so the equal probability for each event would be 0.5. That's what we can see on the tooltip. But, you can specify a probability. Just click on that '?' mark to open the probability editor.

As you can see, once you change the probability of one event node, the other event's probability is automatically adjusted.

Say, you have a chance node with three events. In that case, the software will scale/normalize the probabilities such that the sum of all probabilities will become 1. But, on the node, you will see your input probability. You will see a tooltip with the scaled probability. If the sum of your probabilities is not 1, then the software will show the probabilities in RED color indicating an issue with your number, but behind the scene the software will scale the probabilities and use that scaled value

If you want, you can check the check box "Display auto calculated scaled probabilities on edges" to see the software corrected scaled probability values, as shown below.

This checkbox will show up only when you have more than 2 events in the given chance node.

### Markov Chance Node

We have a dedicated documentation page for Markov Process. Please check this page for details.

### Payoff

The payoff can be profit, cost, distance, time, or any other measure based on your objective. A payoff can be a subjective value too. An action node and an event node can contain a Payoff value. Once selected, you can see the following flyover menu button for adding a payoff to the node.

Once you click that payoff button from the fly-over menu, you will be greeted by this window if you did not already set up your criteria.

Because the decision tree software needs to know what type of payoff you want to use in your model. It can be numeric, subjective, boolean, or cost-effectiveness analysis. As you did not configure that yet, the above window shows up the first time when you add a payoff. Once you complete this configuration and the next time you click the payoff button from your node, you will not have to go thru this same process. Anyway, In this window, basically, it is asking you, if you want to perform a regular single or multiple criteria-based analysis or a healthcare dedicated cost-effectiveness analysis.

Once your criteria are set up, the Payoff popup will be displayed on the node. You can set the popup for multiple objectives at the same time as shown below.

### Parallel Node

Even though the Parallel Node is not a concept in a standard decision tree, it is an extension from SpiceLogic Decision Tree Software. A parallel node is a node where it's children are considered simultaneous decision trees. For example, you may think about 2 decision problems at the same time. Or you may have 2 mutually non-exclusive chance events. Then you can use the parallel node.

A parallel node can be added to an Action Node or an Event node. You will see the flyover menu button for a parallel node.

### Terminal Node

An action node or an Event node can be terminated by a terminal node. When you select an Action node or Event node, you will see the flyover menu showing the Terminal node button. Obviously, a Decision Node or a Chance Node cannot be terminated by a terminal node. Because those nodes can contain only Action / Event as children. Therefore, you will not see the Terminal Node flyover menu option when you select a Decision or a Chance node.

Using a Terminal node is optional. A terminal node does not change any calculation logic for analysis purpose. But, the Terminal node has a very useful benefit. When you add a terminal node, the Total Payoff for that terminal will be displayed by the terminal node.

Not only that, the terminal node shows a lot of useful metrics as a tooltip. Here is a screenshot.