Introduction
A regression tree may split observations at a predictor value such as annual mileage \(x=12{,}000\). That number is a boundary in a rule: observations on one side follow one branch, and observations on the other side follow another. It is not, by itself, a rate of change. The tree’s prediction is the value assigned to the terminal node reached by following the rules.
This distinction matters when interpreting forecasts. A tree can predict different values for two observations with nearly identical predictor values if they fall on opposite sides of a split. Conversely, two observations with quite different predictor values can receive the same prediction if they end in the same terminal node. Neither pattern says that the predictor has a smooth per-unit effect or that changing the predictor would cause the response to change.
A Boundary Is Not a Slope
For a simple tree with one split, the prediction has the form
where \(\hat\mu_L\) and \(\hat\mu_R\) are the predictions in the left and right terminal nodes. Within either region, the prediction is constant: changing \(x\) without crossing the threshold does not change \(\hat f(x)\). Crossing the boundary can change the prediction from \(\hat\mu_L\) to \(\hat\mu_R\). The size of that jump is \(\hat\mu_R-\hat\mu_L\), but it is not a slope per unit of \(x\).
In a deeper tree, a root split first determines a branch, and later splits may subdivide only one of those branches. The prediction depends on the complete sequence of conditions. It is therefore important to report both the rule that identifies the region and the prediction assigned to that region.
Worked Example: Applying a Mileage Threshold
A hypothetical insurer fits a regression tree to predict repair cost per covered incident from annual mileage. The tree has one split: mileage \(x \le 12{,}000\) goes to the left terminal node, while \(x > 12{,}000\) goes to the right. The training repair costs in the left node are $300, $420, and $480; those in the right node are $600, $750, and $900. Find the tree predictions at 9,000, 12,000, and 12,001 miles, and interpret the change at the boundary.
Method. First identify the terminal-node prediction, calculated here as the mean response in that node. Then apply the split rule to each mileage value.
For the left node, the sum of the three costs is \(300+420+480=1{,}200\). Its prediction is \(1{,}200/3=\$400.00\). For the right node, the sum is \(600+750+900=2{,}250\). Its prediction is \(2{,}250/3=\$750.00\).
At 9,000 miles, \(9{,}000\le12{,}000\), so the prediction is $400.00. At exactly 12,000 miles, the condition \(x\le12{,}000\) is still true, so the prediction is also $400.00. At 12,001 miles, \(x>12{,}000\), so the prediction is $750.00.
The prediction difference between 12,000 and 12,001 miles is \(\$750.00-\$400.00=\$350.00\). This is the difference between two terminal-node predictions, not a $350-per-mile rate. Common mistake avoided: treating the one-mile separation as evidence that each additional mile increases repair cost by $350. The tree assigns a constant value on each side; it does not fit a linear increase within either side.
Check. The threshold sends 12,000 miles left and 12,001 miles right, and the corresponding predictions are exactly the two means calculated above.
Why a Terminal Node Uses a Constant Prediction
For a squared-error regression tree, a terminal node is represented by a constant chosen to minimize the sum of squared differences between the observed responses and that constant. This gives a direct explanation for why the tree predicts the same value for every observation in a given terminal node.
This justification concerns squared-error regression trees with unweighted observations. If a fitting procedure uses observation weights, its corresponding node prediction is a weighted mean. Other response criteria can also use a different terminal-node summary. The interpretation principle remains: the split defines the region, and the tree’s stated terminal-node value gives the prediction.
Worked Example: Following a Path Through Two Splits
A hypothetical equipment-repair model uses annual operating hours \(x\) and machine age \(z\). The root rule sends \(x\le10{,}000\) to a left terminal node. If \(x>10{,}000\), a second rule sends machines with \(z\le5\) years to one terminal node and machines with \(z>5\) years to another. The observed repair costs are $280, $340, and $380 in the left node; $500, $620, and $680 in the younger-machine node; and $900 and $1,000 in the older-machine node. Find the predictions for machines with \((x,z)=(8{,}000,7)\), \((12{,}000,4)\), and \((12{,}000,7)\).
Method. Calculate each terminal-node mean, then apply the root rule before using the second rule. A second split is relevant only for observations that take the branch reaching it.
The left-node sum is \(280+340+380=1{,}000\), so its prediction is \(1{,}000/3=\$333.33\) to the nearest cent. The younger-machine node sum is \(500+620+680=1{,}800\), so its prediction is \(1{,}800/3=\$600.00\). The older-machine node sum is \(900+1{,}000=1{,}900\), so its prediction is \(1{,}900/2=\$950.00\).
For \((8{,}000,7)\), the root condition \(8{,}000\le10{,}000\) is true. The observation goes directly to the left terminal node, so the prediction is $333.33. The age of seven years does not send it to the older-machine node, because that second rule is not on this path.
For \((12{,}000,4)\), the root condition is false, so the observation reaches the age split. Since \(4\le5\), it goes to the younger-machine node and receives a prediction of $600.00. For \((12{,}000,7)\), the root condition is again false, but now \(7>5\); the prediction is $950.00.
The root threshold separates the first observation from the other two; it does not supply a cost prediction of 10,000 or a cost change per operating hour. The prediction for each observation comes from its final node. Common mistake avoided: applying the age rule to the first observation despite its having taken the left branch at the root.
Check. The paths are left terminal node; right then younger terminal node; and right then older terminal node. These give $333.33, $600.00, and $950.00, respectively.
Prediction Differences Within and Across Regions
A useful interpretation check is to compare predictions for inputs that remain in one terminal node with predictions for inputs on opposite sides of a threshold. Within a region, a numeric predictor can change without changing the tree prediction. Across a boundary, the prediction may change abruptly. A difference between two predictions can be described as a contrast between those two inputs under the fitted tree; it should not be converted automatically into a per-unit slope.
Worked Example: Comparing a Within-Node Change With a Boundary Change
A hypothetical tree predicts the daily volume of service calls from a numeric workload score \(x\). It assigns a prediction of 40 calls when \(x\le20\), 70 calls when \(20<x\le35\), and 130 calls when \(x>35\). Compare predictions at \(x=18\), \(x=19\), \(x=21\), and \(x=36\). Calculate the prediction differences for the changes from 18 to 19, from 19 to 21, and from 21 to 36, and explain why none is automatically a fitted slope.
Method. Assign each input to its stated region first; only then subtract predictions in the requested order.
Since \(18\le20\), \(\hat f(18)=40\). Since \(19\le20\), \(\hat f(19)=40\). Since \(20<21\le35\), \(\hat f(21)=70\). Since \(36>35\), \(\hat f(36)=130\).
From 18 to 19, the predictor increases by \(19-18=1\), while the prediction difference is \(40-40=0\). From 19 to 21, the predictor increases by \(21-19=2\), while the prediction difference is \(70-40=30\). From 21 to 36, the predictor increases by \(36-21=15\), while the prediction difference is \(130-70=60\).
The first comparison stays in one node, so the prediction is unchanged. The second crosses the threshold at 20, and the third crosses the threshold at 35; each comparison therefore combines the region assignments made by the tree. Dividing 30 by 2 or 60 by 15 would produce average changes between selected inputs, not a slope fitted by this tree. Common mistake avoided: interpreting a finite difference that crosses a split as a constant effect per unit of \(x\).
Check. The four predictions are 40, 40, 70, and 130 calls. Their requested differences are 0, 30, and 60 calls.
What the Threshold Does—and Does Not—Say
A fitted threshold is a rule used to partition predictor space for prediction. It does not establish that the response changes naturally or causally at that exact value. For example, if a tree separates policies at a specified age, that split alone does not show that increasing a policyholder’s age causes the predicted outcome to jump. The threshold may be useful for organizing observed cases even when the underlying relationship is gradual, when other variables differ across the regions, or when the fitted partition is sensitive to the training data.
Likewise, the difference between two terminal-node predictions is not necessarily the effect of changing one predictor while holding everything else fixed. In a deeper tree, the two predictions may come from paths involving different conditions on several predictors. Even in a one-split tree, the groups on each side can differ in other characteristics. The tree is a predictive rule; a causal conclusion requires a separate design and appropriate causal assumptions.
When explaining a tree prediction, give the path and the terminal-node value. For example: “Because mileage exceeds 12,000, the observation goes to the right terminal node, whose predicted repair cost is $750.” Avoid saying “the threshold increases cost by $750” or “each extra mile raises cost by $350.” The first confuses a predictor condition with a response value; the second turns a boundary contrast into a slope.
Check Your Understanding
For each problem, apply the split conditions before interpreting the terminal-node predictions.
- A hypothetical model splits claim count \(x\) at \(x\le3\). The left-node mean is $240 and the right-node mean is $510. What does the model predict at 3 and at 4 claims, and what is the prediction difference? (Answer: $240 at 3 claims, $510 at 4 claims, a $270 prediction difference; this is not a per-claim slope.)
- A tree sends \(x\le50\) to a node predicting 12 units and \(x>50\) to a node predicting 20 units. Compare predictions at \(x=45\) and \(x=49\), then at \(x=50\) and \(x=51\). (Answer: 12 and 12 for 45 and 49; 12 and 20 for 50 and 51.)
- A tree first splits at \(a\le8\). The \(a\le8\) node predicts 100. The \(a>8\) branch then splits at \(b\le2\), predicting 160 there and 220 when \(b>2\). Find predictions for \((a,b)=(7,9)\), \((9,2)\), and \((9,3)\). (Answer: 100, 160, and 220, respectively.)
- A one-split squared-error tree has responses 10, 14, and 18 in its left node, and 22 and 28 in its right node. Calculate both terminal predictions. If an input moves from the left region to the right region, state the prediction contrast without calling it a slope. (Answer: left prediction \(42/3=14\), right prediction \(50/2=25\), prediction contrast \(25-14=11\).)
- A tree predicts 30 for \(x\le10\), 45 for \(10<x\le15\), and 75 for \(x>15\). Calculate predictions at \(x=10\), \(x=15\), and \(x=16\), then find the change from 15 to 16. (Answer: 30, 45, and 75; the prediction change is 30 across the boundary, not a fitted per-unit slope.)