Bootstrap-Replikate erzeugen

Statistical Thinking in Python (Teil 2)

Justin Bois

Lecturer at the California Institute of Technology

Michelsons Messungen zur Lichtgeschwindigkeit

ch2-1.002.png

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

Ein Array neu sampeln

ch2-1.004.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.005.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.006.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.007.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.008.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.009.png

Statistical Thinking in Python (Teil 2)

Ein Array neu sampeln

ch2-1.010.png

Statistical Thinking in Python (Teil 2)

Mittelwert neu gesampelter Michelson-Messungen

ch2-1.011.png

Statistical Thinking in Python (Teil 2)

Bootstrapping

  • Nutzung neu gesampelter Daten für statistische Inferenz
Statistical Thinking in Python (Teil 2)

Bootstrap-Stichprobe

  • Ein neu gesampeltes Array der Daten
Statistical Thinking in Python (Teil 2)

Bootstrap-Replikat

  • Eine aus einem neu gesampelten Array berechnete Kennzahl
Statistical Thinking in Python (Teil 2)

Resampling-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 (Teil 2)

Ein Bootstrap-Replikat berechnen

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 (Teil 2)

Lass uns üben!

Statistical Thinking in Python (Teil 2)

Preparing Video For Download...