Why does a bootstrap sample contain roughly 63.2% unique training observations?

Quick Overview

Asks for the probability argument behind the share of distinct rows in a bootstrap sample. It tests sampling with replacement, a standard limit from calculus, and how the rows each sample leaves out give bagging and Random Forests an out-of-bag error estimate.

Why does a bootstrap sample contain roughly 63.2% unique training observations?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

A bootstrap sample draws n rows with replacement from a training set of n rows, as bagging and Random Forests do for each tree. Why does a bootstrap sample contain roughly 63.2% unique training observations? ```hint Use the complement Fix one training row and work out the probability that it is never chosen in any of the n draws. ``` ### What a Strong Answer Covers - The probability that a given row is missed in one draw, and in all n draws. - The limit of that probability as n grows, and how quickly it is reached. - That 63.2% is an expected fraction, and what fills the rest of the n slots. - Why the rows left out of each sample matter for bagging and Random Forests. ### Follow-up Questions - If each bootstrap sample has m rows drawn from n, what fraction of the rows appears at least once? - How much does the number of unique rows vary from one bootstrap sample to the next? - How is a Random Forest's out-of-bag error computed, and how does it compare with cross-validation? - Why does the .632 bootstrap estimator combine training error and out-of-bag error with those weights?

Overview: Asks for the probability argument behind the share of distinct rows in a bootstrap sample. It tests sampling with replacement, a standard limit from calculus, and how the rows each sample leaves out give bagging and Random Forests an out-of-bag error estimate.

PracHub logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

A bootstrap sample draws n rows with replacement from a training set of n rows, as bagging and Random Forests do for each tree. Why does a bootstrap sample contain roughly 63.2% unique training observations?

What a Strong Answer Covers Guidance

  • The probability that a given row is missed in one draw, and in all n draws.
  • The limit of that probability as n grows, and how quickly it is reached.
  • That 63.2% is an expected fraction, and what fills the rest of the n slots.
  • Why the rows left out of each sample matter for bagging and Random Forests.

Follow-up Questions Guidance

  • If each bootstrap sample has m rows drawn from n, what fraction of the rows appears at least once?
  • How much does the number of unique rows vary from one bootstrap sample to the next?
  • How is a Random Forest's out-of-bag error computed, and how does it compare with cross-validation?
  • Why does the .632 bootstrap estimator combine training error and out-of-bag error with those weights?