How does Random Forest estimate conditional expectation E[Y|X] in classification and regression?
Updated May 17, 2026
Short answer
Random Forest approximates E[Y|X] by averaging outcomes of samples falling into similar leaf regions across many trees.
Deep explanation
Each decision tree partitions the feature space into regions R₁, R₂, ..., Rₖ. Within each region, predictions are constant (regression: mean of targets, classification: class probabilities). Random Forest averages these piecewise estimates across many bootstrapped trees. As the number of trees increases, the estimator converges toward the conditional expectation E[Y|X] under certain regularity conditions, making it a non-parametric regression estimator.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro