Part 1: Root impurity
The root node has default share
\hat p = \frac{3}{6} = \frac{1}{2}.
Hence the root entropy is
H\left(\frac{1}{2}\right)
=
-\frac{1}{2}\log\left(\frac{1}{2}\right)
- \frac{1}{2}\log\left(\frac{1}{2}\right)
= \log 2
\approx 0.693.
The root Gini impurity is
G\left(\frac{1}{2}\right) = 2 \cdot \frac{1}{2} \cdot \frac{1}{2} = 0.5.
Part 2: Split at x=2.15
Left leaf: firms 1, 2, 3 with labels (0,0,1), so \hat p_L = 1/3.
Right leaf: firms 4, 5, 6 with labels (0,1,1), so \hat p_R = 2/3.
Entropy in each child is the same:
H\left(\frac{1}{3}\right)
=
-\frac{1}{3}\log\left(\frac{1}{3}\right)
- \frac{2}{3}\log\left(\frac{2}{3}\right)
\approx 0.637.
Therefore the weighted child entropy is
\frac{3}{6} \cdot 0.637 + \frac{3}{6} \cdot 0.637 = 0.637.
The child Gini impurity is also the same in both leaves:
G\left(\frac{1}{3}\right) = 2 \cdot \frac{1}{3} \cdot \frac{2}{3} = \frac{4}{9} \approx 0.444.
So the weighted child Gini impurity is
\frac{3}{6}\cdot \frac{4}{9} + \frac{3}{6}\cdot \frac{4}{9}
= \frac{4}{9}
\approx 0.444.
Part 3: Split at x=1.5
Left leaf: firms 1 and 2 with labels (0,0), so \hat p_L = 0.
Right leaf: firms 3, 4, 5, 6 with labels (1,0,1,1), so \hat p_R = 3/4.
Left-leaf entropy is H(0)=0, and right-leaf entropy is
H\left(\frac{3}{4}\right)
=
-\frac{3}{4}\log\left(\frac{3}{4}\right)
- \frac{1}{4}\log\left(\frac{1}{4}\right)
\approx 0.562.
Hence the weighted child entropy is
\frac{2}{6}\cdot 0 + \frac{4}{6}\cdot 0.562 \approx 0.375.
Left-leaf Gini is G(0)=0, and right-leaf Gini is
G\left(\frac{3}{4}\right) = 2 \cdot \frac{3}{4}\cdot \frac{1}{4} = \frac{3}{8} = 0.375.
Hence the weighted child Gini impurity is
\frac{2}{6}\cdot 0 + \frac{4}{6}\cdot 0.375 = 0.25.
So the split at x=1.5 is preferred under both entropy and Gini because it produces the lower weighted child impurity. It is worth noting that the two criteria agree here; they need not in general, which is why the question asks for both.
For that preferred split the leaf default probabilities are \hat p_L = 0 and \hat p_R = 3/4, so under a 0.5 threshold the implied classifier predicts no default on the left leaf and default on the right leaf.
Part 4: Asymmetric decision threshold
If we predict default, the only mistake is a false positive, which occurs with probability 1-\hat p. The expected loss is therefore
If we predict no default, the only mistake is a false negative, which occurs with probability \hat p. The expected loss is
Predicting default is optimal when L(1) < L(0):
C_{FP}(1-\hat p) < C_{FN}\hat p.
Rearranging gives
C_{FP} < \hat p(C_{FP}+C_{FN})
\quad \Longleftrightarrow \quad
\hat p > \frac{C_{FP}}{C_{FP}+C_{FN}}.
If C_{FN}=4 and C_{FP}=1, the optimal threshold is
So with asymmetric losses, a bank should predict default for a firm whenever the estimated default probability exceeds 0.2, not 0.5.
Part 5: Applying the threshold
Applying the two thresholds to the leaves of both candidate splits:
| x=1.5 (preferred) |
left |
0 |
no default |
no default |
| x=1.5 (preferred) |
right |
3/4 |
default |
default |
| x=2.15 |
left |
1/3 |
no default |
default |
| x=2.15 |
right |
2/3 |
default |
default |
Only one leaf changes: the left leaf of the split at x=2.15, whose default probability 1/3 lies between the two thresholds. That is the general principle—lowering the threshold from 0.5 to 0.2 reclassifies exactly those leaves with \hat p \in (0.2, 0.5], and no others. The leaves of the preferred split have \hat p = 0 and \hat p = 3/4, both far outside that interval, so its classifier is unchanged.
Two lessons follow. First, the direction of the change is what asymmetric costs demand: because a missed default costs four times a false alarm, the rule becomes more willing to declare default, and a leaf that was previously called safe on a one-in-three default rate is now flagged. Second, the threshold matters only when fitted probabilities fall in the affected interval; a tree whose leaves are close to pure is insensitive to the cost ratio, which is a reason to report the leaf probabilities themselves rather than only the classifications.