What is Gini Impurity in Decision Trees?

Updated May 16, 2026

Short answer

Gini impurity measures the probability of misclassification in a dataset.

Deep explanation

Gini impurity evaluates how often a randomly chosen element would be incorrectly labeled if it were randomly labeled according to class distribution. Lower Gini means purer nodes. It is computationally simpler than entropy and often preferred in practice.

Real-world example

Used in credit scoring systems to classify loan risk levels.

Common mistakes

  • Confusing Gini impurity with Gini coefficient used in economics.

Follow-up questions

  • Why is Gini faster than entropy?
  • Can Gini and entropy give different trees?

More Decision Trees interview questions

View all →