Bootstrapping estimates the variability of a statistic by repeatedly resampling an observed dataset. It can help estimate confidence intervals when the underlying data distribution is unknown or difficult to determine analytically. section 3.4.4
To build a bootstrap distribution:
- Draw a random sample with replacement from the observed data, using the same number of observations as the original dataset. An observation can appear more than once in a sample. section 3.4.4
- Calculate the statistic of interest, such as a mean, median, or regression coefficient, for that sample. section 3.4.4
- Repeat the sampling and calculation. The resulting distribution of statistics can be used to estimate a confidence interval. section 3.4.4
Comparing sales and satisfaction
A retailer can use transaction data to estimate confidence intervals for average sales prices and review scores by state. The intervals show uncertainty that a point estimate alone does not. Their width depends on sample size, the selected confidence level, and variability in the data. section 3.4.4 section 4.8
Figure 4.6 Confidence intervals for (a) average sales price and (b) average review scores, for transactions in the “health and beauty” category of products
Compare the intervals for average sales prices and review scores across states; uncertain estimates can make a state comparison inconclusive. section 4.8
First ask what population you want to describe. If the data are only a subset of transactions, an interval can express uncertainty about the wider population. If they contain every transaction in the population of interest, you can calculate that population’s average directly. Repeated resampling can also be computationally intensive, so check execution time when scaling the analysis. section 4.8 section 7.1
