Hong Kong Baptist University · FACULTY OF ECONOMICS

ECON7880 Chap.3 Decision Trees and Information Gain

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 3 of 8 · ECON7880

Decision Trees and Information Gain

Measure uncertainty with counts

A decision tree chooses questions that create purer child nodes.

This chapter calculates binary entropy from class shares, combines children using their sizes and subtracts weighted child impurity from the parent to obtain information gain.

Stop before purity becomes memorisation

Tiny pure leaves can encode individual training observations rather than repeatable structure.

Validation, depth limits, minimum leaf sizes and pruning control that risk, while path interpretation turns a fitted tree into an auditable rule.

Write node counts before probabilities

Every entropy calculation begins with class counts local to one node. Convert those counts to proportions using the node total, not the full dataset. A pure node has entropy zero, while an even binary node has one bit.

These boundary values are fast checks on arithmetic. If a purported probability is negative, exceeds one or the class shares do not sum to one, stop before calculating logarithms.

Weight children by how much data they carry

A candidate split can create one impressive tiny child and one large mixed child. Equal averaging would overstate the tiny branch.

Multiply each child entropy by its share of the parent, sum the weighted values and subtract from parent entropy.

Compare candidate gains using the same parent value and delay rounding until the end, because close splits can reverse when intermediate values are shortened.

Read a tree as a collection of conditional rules

A path to a leaf joins every split condition with “and.” Translate the path into words, then attach the leaf sample size and positive rate. That makes the coverage and evidence visible.

A leaf probability is a training proportion rather than a guaranteed future probability, so held-out results and stability across folds must accompany any operational interpretation.

Control complexity with evidence

Growing until every leaf is pure usually memorises training cases.

Compare depths, minimum leaf sizes or pruning strengths inside cross-validation and keep an untouched test set for the selected procedure. When two trees perform similarly, prefer the smaller structure if it preserves the decision-relevant metric. Monitor leaf volumes after deployment because drift can empty a once-important branch or change its observed outcome rate.

In this chapter

What this chapter covers

  • 01

    Parent class counts

  • 02

    Binary entropy

  • 03

    Weighted child entropy

  • 04

    Information gain

  • 05

    Leaf probabilities

  • 06

    Pruning and minimum leaves

Worked example · free

Calculate entropy reduction

Q [9 marks]. A balanced node splits into a pure small child and a mixed large child. Compute the gain. The displayed marks are an AskSia revision weighting, not a University scheme.
Information gain measures the improvement.Information gain measures the improvement. The two arrows divide one parent into branches whose class counts are more concentrated than the original mixture.Income splitLow branch2 yes, 6 noHigh branch7 yes, 1 noUseful splits create purer children
Information gain measures the improvement. The two arrows divide one parent into branches whose class counts are more concentrated than the original mixture.
  • 2Calculate parent entropy.
  • 4Weight both child entropies.
  • 3Interpret the resulting gain.
The balanced parent has entropy one. Weight the pure child’s zero entropy and the mixed child’s entropy by their shares of the parent, then subtract the total from one. The positive gain comes from isolating a pure group, while the remaining mixed branch may need another validated split.
Sia tip — Write counts beside every node before converting them to probabilities.
Glossary

Key terms

Node Entropy
Class uncertainty within one tree node, calculated from that node’s class proportions.
Weighted Impurity
The sum of child impurities multiplied by their shares of the parent observations.
Pruning
Removing weak branches to trade some training fit for simpler and more stable predictions.
FAQ

Decision Trees and Information Gain FAQ

When is binary entropy highest?

It is highest at one bit when the two classes are equally represented. It falls toward zero as one class dominates and equals zero at a pure node with only one class remaining.

Why are child entropies weighted?

A large child represents more of the parent observations than a small child. Equal averaging would let a tiny branch influence the split as much as a large one.

Is a pure leaf always desirable?

No. Purity based on very few observations may be unstable. Report leaf size and validate pruning or minimum-size choices on unseen data, then inspect whether the same path and class rate recur across folds or later samples. Stable larger leaves may be more useful for monitoring and deployment decisions.

Study strategy

Exam move

Recalculate two candidate splits by hand. Keep counts, proportions, entropies, child weights and gain on separate lines, then compare the results before rounding. Translate one leaf path into a business rule with its sample size and class rate. Next, imagine that the last split creates leaves of one observation each and decide whether validation supports pruning.

Finish by explaining why a pure leaf, high training accuracy and high information gain are local facts rather than automatic proof of generalisation. Draw a second tree with the same training accuracy but fewer leaves and compare validation recall, stability and interpretability. Check entropy boundary cases for a pure node and an even node without a calculator.

Finally, inspect the root split across several folds and write what a changing variable or threshold says about the strength of the evidence. Double every node count and confirm that gain is unchanged, then explain why reliability still depends strongly on sample size.

Working through Decision Trees and Information Gain in ECON7880? Sia is AskSia’s AI Economics tutor — ask any ECON7880 Decision Trees and Information Gain question and get a clear, step-by-step explanation grounded in how ECON7880 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 12 of your Hong Kong Baptist University subjects - and 1,000+ Bibles across every Australian university.
Sia - your ECON7880 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works