12.2 Referencing Variables in a Tree

You can enter quantities (payoffs, probabilities, etc.) by directly entering numeric values into a model. However, TreeAge Pro provides the flexibility of to enter quantities as variables, then reference those variables within the model. There are significant benefits to entering numeric values as Variables, including efficiency, consistency and setting your model up for Sensitivity Analysis.

We'll start with the single variable that we created in the section before: pJury_CoalBad in the model BreachOfContract.trex. The variable represents the probability that the jury will find that coal did not meet specs.

To reference the variable in a model probability:

  • Click on the numeric value 0.60 beneath the Jury finds coal did not meet specs node.

  • Click the =fx button to open the Formula Editor.

  • Delete the prior value.

  • Select Variables in the left pane, then double-click the variable pJury_CoalBad in the right pane.

  • Now that you have the expression you want that references the appropriate variable, click OK.

  • The formula you entered pJury_CoalBad will now be placed in the model where you opened the Formula Editor.

Note that you can also just type the variable into the probability expression, but using the formula guarantees that you use a variable from the model. If you enter a variable name that doesn't exist, you will be prompted to create a variable with the name you entered.

Complementary probabilities

When you enter probabilities into your model, you have the option of using the complement sign # for one of the probabilities. Note that the complimentary probability for the alternative path is entered as #. That allows you to change the value of pJury_CoalBad and the compliment will always be calculated as (1 - pJury_CoalBad).

Note that you can only use the # for one branch of a chance node.

To update payoff expressions in a Decision Tree:

Variables can also be referenced in model payoffs.

To reference a variable in a Terminal Node payoffs:

  • Double-click on the Terminal node where you want to edit the payoff or right-click on the Terminal node and choose Edit Payoffs from the context menu.

  • The Edit Payoff dialog will open.

  • Click the =fx button to open the Formula Editor.

  • Delete the prior value and replace it with a variable as described above.

  • Click OK. The Payoff entry now references the variable.

The legal Example model BreachOfContract-Variables.trex references variables for all the key model inputs.