Why does a bootstrap sample contain roughly 63.2% unique training observations?
Last updated
A given row is missed in one draw with probability 1 − 1/n, so it is missed in all n independent draws with probability (1 − 1/n)ⁿ → 1/e ≈ 0.368.
So about 63.2% of rows appear at least once. This converges fast (about 0.634 at n = 100) and is an expected value, with duplicates filling the rest of the n slots.
The ~36.8% left out are each tree's out-of-bag rows, giving a free validation estimate.
- https://mbrenndoerfer.com/writing/random-forest-ensemble-learning-bootstrap-sampling-feature-selection-classification-regression-guide
- https://datarekha.com/interview/machine-learning/oob-error-random-forest/
- https://www.analyticsvidhya.com/blog/2021/05/bagging-25-questions-to-test-your-skills-on-random-forest-algorithm/