Here are the steps to construct the decision tree using the Gini index approach:
1. Calculate the Gini index for the total dataset:
Gini(Total) = 1 - (19/40)2 - (21/40)2 = 0.5
2. Calculate the Gini index for age <= 50 split:
Gini(S1) = 1 - (8/19)2 - (11/19)2 = 0.3789
Gini(S2) = 1 - (11/21)2 - (10/21)2 = 0.4762
3. Calculate the Gini index for the split:
Gini(Split) = (19