100. Bootstrap Confidence Interval

Hard

Compute a bootstrapped 95% confidence interval for the mean of 1-D array X: seed the global random state with 0 (inside solve, immediately before drawing; it's global, shared state, so seeding anywhere else won't reproduce the same numbers), draw N = 1000 resamples (with replacement, each of size X.size), take the mean of each, and return the 2.5th and 97.5th percentiles as a length-2 array.

Sign in to write and run your own code.

Implement solve(...)