Inleiding tot statistiek in Python
Maggie Matsui
Content Developer, DataCamp



Als het gemiddeld aantal adopties per week 8 is, wat is $P(\text{\# adopties in een week} = 5)$?
from scipy.stats import poissonpoisson.pmf(5, 8)
0.09160366
Als het gemiddeld aantal adopties per week 8 is, wat is $P(\text{\# adopties in een week} \le 5)$?
from scipy.stats import poisson
poisson.cdf(5, 8)
0.1912361
Als het gemiddeld aantal adopties per week 8 is, wat is $P(\text{\# adopties in een week} \gt 5)$?
1 - poisson.cdf(5, 8)
0.8087639
Als het gemiddeld aantal adopties per week 10 is, wat is dan $P(\text{\# adopties in een 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])

Inleiding tot statistiek in Python