A decision tree schema is a structured blueprint for a decision tree. It records decision points, uncertain events, probabilities, and payoffs before the tree is plotted, ensuring that possible outcomes are represented systematically. section 10.2
Build the schema by organizing the decision into a hierarchy:
- Identify the primary choices and label their nodes as decision nodes. section 10.2.1
- List variables that affect outcomes, such as costs or agent fees. section 10.2.1
- Add chance nodes for uncertain events, enumerate their outcomes, and assign probabilities that sum to 1 for each chance node. section 10.2.1
- Specify the payoff for every possible terminal outcome, then use indentation or tabs to show decision and event levels. section 10.2.1
Contract-option schema
A contract decision can branch from signing with the Dodgers or Yankees. The Dodgers branch includes an agent-fee cost, a health chance node with probabilities such as 0.75 and 0.25, and performance-incentive outcomes with associated probabilities and payoffs; the Yankees branch can carry a fixed payoff. section 10.2.1
name: Contract Options
variables:
agent fees: 13,000,000
type: decision
Sign with Dodgers:
cost: agent fees #1
type: chance #2
Stays Healthy: #3
p: 0.75 #4
Does not stay healthy: #5
p: 0.25 #6
Sign with Yankees:
payoff: 120,000,000
A compact schema listing shows how variables, costs, decision nodes, chance nodes, probabilities, and fixed payoffs fit together before implementation. section 10.2.1
After defining the schema manually, represent it programmatically with Python's anytree library and plot the resulting structure with Matplotlib. Expected payoffs can be calculated by weighting outcomes by their probabilities and subtracting specified costs. section 10.2
