How does a random forest improve on a single decision tree?
A single decision tree splits data recursively on feature thresholds to maximize purity (using Gini impurity or entropy). It is interpretable and handles non-linear relationships, but a deep tree easily overfits: small changes in data can produce a very different tree, meaning high variance. A random forest is an ensemble of many decision trees trained via bagging: each tree sees a bootstrap sample of rows, and at each split only a random subset of features is considered. This decorrelates the trees, and averaging their predictions dramatically reduces variance while keeping bias low, giving better generalization and robustness to noise. The cost is lost interpretability and higher compute, though feature importance and out-of-bag error estimates partly recover insight. In short, the forest trades a single tree's transparency for accuracy and stability.