MAS-II · Statistical Learning · Free Lesson

Calculate the summary statistics for a set of decision trees (e.g., Gini index, entropy, residual sum of squares).

Free CAS MAS-II (Modern Actuarial Statistics II) lesson in Statistical Learning. 17 min read, ~2,578 words.

A regression tree splits 600 policies into terminal nodes; a classification tree splits the same policies into "lapse / renew" leaves. The first scores splits by squared error, the second by node impurity. Same algorithm, different summary statistics.

Why two families of criteria. A regression tree predicts a number, so squared error is the natural loss. A classification tree predicts a class label, so the criterion must measure how mixed each node is. Pure nodes earn impurity zero; 50/50 mixes earn the maximum.

For a region RmR_m containing NmN_m training observations, the fitted value is the regional mean y^Rm=1Nm∑i∈Rmyi\hat{y}_{R_m} = \tfrac{1}{N_m}\sum_{i\in R_m} y_i. The node-level RSS is:

RSSm=∑i∈Rm(yi−y^Rm)2\text{RSS}_m = \sum_{i\in R_m}(y_i - \hat{y}_{R_m})^2

Tree-level RSS sums across all MM terminal nodes:

RSS(T)=∑m=1M∑i∈Rm(yi−y^Rm)2\text{RSS}(T) = \sum_{m=1}^{M}\sum_{i\in R_m}(y_i-\hat{y}_{R_m})^2

Choosing a split. For predictor XjX_j and cutpoint ss, define half-planes R1(j,s)={X∣Xj≤s}R_1(j,s) = \{X|X_j\le s\} and R2(j,s)={X∣Xj>s}R_2(j,s) = \{X|X_j>s\}. Pick (j,s)(j,s) to minimize:

∑i∈R1(yi−y^R1)2+∑i∈R2(yi−y^R2)2\sum_{i\in R_1}(y_i-\hat{y}_{R_1})^2 + \sum_{i\in R_2}(y_i-\hat{y}_{R_2})^2

KEY: The reduction Δ=RSSparent−(RSSR1+RSSR2)\Delta = \text{RSS}_{\text{parent}} - (\text{RSS}_{R_1} + \text{RSS}_{R_2}) is always nonnegative under greedy splitting. A useless split gives Δ=0\Delta = 0.

Read the full lesson, free →
Worked examples and practice. Free with a free account, no card.

Common mistakes

Bottom line

Exam shortcut

If the response is numeric, the criterion is RSS and the regional fitted value is the regional mean; compute parent RSS, child RSS, and subtract. If the response is categorical and the problem asks for "impurity" without naming a measure, default to Gini unless it explicitly says "cross-entropy" or "deviance".

The full lesson (about 2,578 words, 17 min read) adds 8 worked examples, all 6 common mistakes, a self-check, free in the app.

Learning objectives

Browse all free MAS-II lessons or jump into free MAS-II practice questions.