Sunday, April 30, 2017

Basic Boostrap

Q: How to derive distribution estimates based on relatively small sample?

A: Using bootstrap to derive a statistic or model parameter.

The basic idea of bootstrapping is that inference about a population from sample data, (sample → population), can be modeled by resampling the sample data and performing inference about a sample from resampled data, (resampled → sample).

Bootstrap does not necessarily involve any assumptions about the data, or the sample statistic, being normally distributed. In practice, it is not necessary to actually replicate the sample a huge number of times. We simply replace each observation after each draw—we sample with replacement. In this way, we effectively create an infinite population in which the probability of an element being drawn remains unchanged from draw to draw. The algorithm for a bootstrap resampling of the mean is as follows, for a sample of size N:
  1.  Draw a sample value, record, replace it
  2.  Repeat N times
  3.  Record the mean of the N resampled values
  4.  Repeat steps 1-3 B times
  5.  Use the B results to:
    1.  Calculate their standard deviation (this estimates sample mean standard error)
    2.  Produce a histogram or boxplot
    3.  Find a confidence interval