Bootstrap-replicaten genereren

Statistical Thinking in Python (deel 2)

Justin Bois

Lecturer at the California Institute of Technology

Michelsons lichtsnelheidsmetingen

ch2-1.002.png

1 Data: Michelson, 1880
Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.004.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.005.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.006.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.007.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.008.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.009.png

Statistical Thinking in Python (deel 2)

Een array hersamplen

ch2-1.010.png

Statistical Thinking in Python (deel 2)

Gemiddelde van hersamplede Michelson-metingen

ch2-1.011.png

Statistical Thinking in Python (deel 2)

Bootstrappen

  • Statistische inferentie met hersamplede data
Statistical Thinking in Python (deel 2)

Bootstrap-steekproef

  • Een hersamplede array van de data
Statistical Thinking in Python (deel 2)

Bootstrap-replicaat

  • Een statistiek berekend uit een hersamplede array
Statistical Thinking in Python (deel 2)

Hersample-engine: np.random.choice()

import numpy as np
np.random.choice([1,2,3,4,5], size=5)
array([5, 3, 5, 5, 2])
Statistical Thinking in Python (deel 2)

Een bootstrap-replicaat berekenen

bs_sample = np.random.choice(michelson_speed_of_light,
                             size=100)

np.mean(bs_sample)
299847.79999999999
np.median(bs_sample)
299845.0
np.std(bs_sample)
83.564286025729331
Statistical Thinking in Python (deel 2)

Laten we oefenen!

Statistical Thinking in Python (deel 2)

Preparing Video For Download...