What is Gini impurity?

Updated May 17, 2026

Short answer

Gini impurity measures how often a randomly chosen element would be incorrectly classified.

Deep explanation

It is used to decide splits in decision trees. Lower Gini means better purity of nodes.

Real-world example

Used in classification problems like customer segmentation.

Common mistakes

  • Confusing Gini with entropy.

Follow-up questions

  • What is entropy?
  • Which is better, Gini or entropy?

More Random Forest interview questions

View all →