Einführung in die Statistik in Python
Maggie Matsui
Content Developer, DataCamp
Wenn die durchschnittliche Anzahl der Adoptionen pro Woche 8 beträgt, wie hoch ist dann $P(\text{# adoptions in a week} = 5)$?
from scipy.stats import poisson
poisson.pmf(5, 8)
0.09160366
Wenn die durchschnittliche Anzahl der Adoptionen pro Woche 8 beträgt, wie hoch ist dann $P(\text{# adoptions in a week} \le 5)$?
from scipy.stats import poisson
poisson.cdf(5, 8)
0.1912361
Wenn die durchschnittliche Anzahl der Adoptionen pro Woche 8 beträgt, wie hoch ist dann $P(\text{# adoptions in a week} \gt 5)$?
1 - poisson.cdf(5, 8)
0.8087639
Wenn die durchschnittliche Anzahl der Adoptionen pro Woche 10 beträgt, wie hoch ist dann $P(\text{# adoptions in a week} \gt 5)$?
1 - poisson.cdf(5, 10)
0.932914
from scipy.stats import poisson
poisson.rvs(8, size=10)
array([ 9, 9, 8, 7, 11, 3, 10, 6, 8, 14])
Einführung in die Statistik in Python