I have a function adapted from https://towardsdatascience.com/calculating-confidence-interval-with-bootstrapping-872c657c058d. It creates bootstrap replicate samples of my d