Generování bootstrap replikátů

Statistical Thinking in Python (Part 2)

Justin Bois

Lecturer at the California Institute of Technology

Michelsonova měření rychlosti světla

ch2-1.002.png

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

Převzorkování pole

ch2-1.004.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.005.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.006.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.007.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.008.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.009.png

Statistical Thinking in Python (Part 2)

Převzorkování pole

ch2-1.010.png

Statistical Thinking in Python (Part 2)

Průměr převzorkovaných Michelsonových měření

ch2-1.011.png

Statistical Thinking in Python (Part 2)

Bootstrapping

  • Použití převzorkovaných dat ke statistické inferenci
Statistical Thinking in Python (Part 2)

Bootstrap vzorek

  • Převzorkované pole dat
Statistical Thinking in Python (Part 2)

Bootstrap replikát

  • Statistika vypočítaná z převzorkovaného pole
Statistical Thinking in Python (Part 2)

Modul pro převzorkování: 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 (Part 2)

Výpočet bootstrap replikátu

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

Lass uns üben!

Statistical Thinking in Python (Part 2)

Preparing Video For Download...