Rozdělení pravděpodobnosti a jejich příběhy: Binomické rozdělení

Statistical Thinking in Python (Part 1)

Justin Bois

Teaching Professor at the California Institute of Technology

Funkce pravděpodobnostní hmotnosti (PMF)

  • Soubor pravděpodobností diskrétních výsledků
Statistical Thinking in Python (Part 1)

Diskrétní rovnoměrná PMF

ch3-3.004.png

Statistical Thinking in Python (Part 1)

Rozdělení pravděpodobnosti

  • Matematický popis výsledků
Statistical Thinking in Python (Part 1)

Diskrétní rovnoměrné rozdělení: příběh

Výsledek hodu spravedlivou kostkou je

  • Diskrétní
  • Rovnoměrně rozdělený.
Statistical Thinking in Python (Part 1)

Binomické rozdělení: příběh

  • Počet r úspěchů v n Bernoulliho pokusech s pravděpodobností úspěchu p má binomické rozdělení
  • Počet r hlav při 4 hodech mincí s pravděpodobností 0,5 má binomické rozdělení
Statistical Thinking in Python (Part 1)

Vzorkování z binomického rozdělení

rng.binomial(4, 0.5)
2
rng.binomial(4, 0.5, size=10)
array([4, 3, 2, 1, 1, 0, 3, 2, 3, 0])
Statistical Thinking in Python (Part 1)

Binomická PMF

samples = rng.binomial(60, 0.1, size=10000)
n = 60
p = 0.1

ch3-3.019.png

Statistical Thinking in Python (Part 1)

Binomická CDF

import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
x, y = ecdf(samples)
_ = plt.plot(x, y, marker='.', linestyle='none')
plt.margins(0.02)
_ = plt.xlabel('number of successes')
_ = plt.ylabel('CDF')
plt.show()
Statistical Thinking in Python (Part 1)

Binomická CDF

ch3-3.022.png

Statistical Thinking in Python (Part 1)

Pojďme si procvičit!

Statistical Thinking in Python (Part 1)

Preparing Video For Download...