A bootstrap sample is n draws, with replacement, from n observations. Each draw misses observation j with probability 1 − 1/n, so j is absent with probability (1 − 1/n)n and present with probability 1 − (1 − 1/n)n, which falls to 1 − 1/e ≈ 0.632 (Exercise 5.2). Draw samples and compare: the grid shows one sample, the panels the exact laws (bars and curves) against what you have drawn (dots).
Observation j = 4 is outlined in white in the grid, as in Exercise 5.2(h). The distribution of the number of distinct observations is computed exactly, one draw at a time: a new draw is a new observation with probability (n − k)/n when k are already in. The copies of one observation follow the Binomial(n, 1/n) law, close to Poisson(1).
code/ch05_resampling_methods.py (inclusion_prob, distinct_count_pmf, Exercise 5.2(g)).