Skip to content

Instantly share code, notes, and snippets.

@jfarid27
Created March 7, 2016 16:28
Show Gist options
  • Save jfarid27/6aa6dfcce4471ca98e7f to your computer and use it in GitHub Desktop.
Save jfarid27/6aa6dfcce4471ca98e7f to your computer and use it in GitHub Desktop.
A bootstrapping example
def bootstrapping(observable, dataset, samples=1000):
observableDist = []
for n in range(samples):
sample = []
for k in range(len(data))
sample.append(dataset[random.randint(0, len(dataset)-1)])
observableDist.append(observable(sample))
return observableDist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment