Estimate expected number of unique data points in a bootstrap sample


Bootstrapping is a statistical resampling method where we repeatedly sample with replacement from a dataset of size \( n\) to create new samples of the same size. Since sampling is done with replacement, some elements in the original dataset will appear multiple times in the bootstrap sample, while others may not appear at all. Your task is to determine the expected number of unique data points in a bootstrap sample of size \(n\).

Code Output