Premium problem124. Bootstrap Sample Means

Medium Locked

Draw B bootstrap resamples from data, each the same size as the original and taken with replacement, and return the list of their means.

The spread of those means estimates the sampling distribution of the mean without any formula for it, which is the whole appeal of the bootstrap.

Seed np.random.seed(seed) inside solve, immediately before drawing.

Input

data = [1.0, 2.0, 3.0, 4.0, 5.0]
B = 5
seed = 0

Output

[3.6, 3.0, 2.4, 2.4, 2.6]

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)