Eine Hypothese formulieren und simulieren

Statistical Thinking in Python (Teil 2)

Justin Bois

Lecturer at the California Institute of Technology

US-Swing States: Wahlergebnisse 2008

ch3-1.002.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

ch3-1.004.png

Statistical Thinking in Python (Teil 2)

Hypothesentests

  • Beurteilung, wie plausibel die beobachteten Daten sind, wenn eine Hypothese gilt
Statistical Thinking in Python (Teil 2)

Nullhypothese

  • Ein anderer Name für die Hypothese, die du testest
Statistical Thinking in Python (Teil 2)

ECDFs der Wahlergebnisse in Swing States

ch3-1.009.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

Prozentstimmen für Obama

ch3-1.011.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

Die Hypothese simulieren

ch3-1.013.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

Die Hypothese simulieren

ch3-1.015.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

Die Hypothese simulieren

ch3-1.017.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 2)

Die Hypothese simulieren

ch3-1.019.png

Statistical Thinking in Python (Teil 2)

Permutation

  • Zufällige Neuordnung der Einträge in einem Array
Statistical Thinking in Python (Teil 2)

Eine Permutationsstichprobe erzeugen

import numpy as np
dem_share_both = np.concatenate(
                       (dem_share_PA, dem_share_OH))

dem_share_perm = np.random.permutation(dem_share_both)
perm_sample_PA = dem_share_perm[:len(dem_share_PA)] perm_sample_OH = dem_share_perm[len(dem_share_PA):]
Statistical Thinking in Python (Teil 2)

Lass uns üben!

Statistical Thinking in Python (Teil 2)

Preparing Video For Download...