2. (5 points) Classification trees & entropy
A bank would like to predict which customers will accept a loan offer. It uses historic data to
construct a classification tree to classify records as either "non-acceptors" (orange) or "acceptors"
(blue). The variables include family income ($1000s), family size, and a categorical variable for
education, where 0 indicates a high school diploma, 1 indicates a bachelor's degree, and 2 indicates a
graduate degree.
All arrows to the left indicate the condition in the splitting node is "true;" all arrows to the right
indicate the condition is "false." In addition to the splitting condition, nodes contain the total number
of records in the subgroup and the number in each target category, [non-acceptors, acceptors].
a. Construct the logical if/then statements that correspond to node a, and calculate the estimated
probability that the predicted class is correct.
b. Construct the logical if/then statements that correspond to node b, and calculate the estimated
probability that the predicted class is correct.
c. Calculate the entropy in node b.
Income $\leq$ 110.5
samples = 3000
value = [2713, 287]
False
True
Education $\leq$ 1.5
2363
637
[2326, 37]
[387, 250]
Node a
Family $\leq$ 2.5
400
[357, 43]
Income $\leq$ 116.5
237
[30, 207]
355
[355, 0]
45
[2, 43]
44
[30, 14]
193
[0, 193]
Node b