Exercise 5.4

The standard deviation of our prediction can be estimated using bootstrap. This technique allows us to obtain new data sets by repeatedly sampling, with replacement, the original data set.

In this case, we want to estimate the standard deviation. The first thing to do is to repeat the bootstrap process a large number of times (e.g. 10 000 times). After that, to each of the data sets generated by bootstrap (bootstrap samples), we fit a model and make a prediction. The standard deviation of the resulting set of predictions is then used to estimate the standard deviation of our predictor.

The bootstrap approach can be used to estimate other properties of an estimator (e.g. mean, confidence intervals, prediction error).