import seaborn as sb
import numpy as np
from scipy.stats import geom
x = np.arange(0, 25)
p = 0.2
dist = geom(p)
ax = sb.barplot(x=x, y=dist.pmf(x))
import seaborn as sb
import numpy as np
from scipy.stats import geom
x = np.arange(0, 25)
p = 0.9
dist = geom(p)
ax = sb.barplot(x=x, y=dist.pmf(x))
import seaborn as sb
import numpy as np
from scipy.stats import geom
x = np.arange(0, 25)
p = 0.5
dist = geom(p)
ax = sb.barplot(x=x, y=dist.pmf(x))
import seaborn as sb
import numpy as np
from scipy.stats import nbinom
from scipy.special import comb
r = 5
x = np.arange(r, 50)
p = 0.4
y = [comb(i - 1,r - 1)*np.power(p, r)
*np.power(1-p, i - r) for i in x]
ax = sb.barplot(x=x, y=y)
import seaborn as sb
import numpy as np
from scipy.stats import binom
n=50
p=0.6
x = np.arange(0,n)
rv = binom(n, p)
ax = sb.barplot(x=x, y=rv.pmf(x))
import seaborn as sb
import numpy as np
from scipy.stats import hypergeom
[N, a, n] = [1000, 600, 50] #p = 0.6
x = np.arange(0,n)
rv = hypergeom(N, a, n)
ax = sb.barplot(x=x, y=rv.pmf(x))
i.e., increase n
i.e., increase n even more
till
\(n \rightarrow \infty\)
(we will compute this limit on the next slide)
import seaborn as sb
import numpy as np
from scipy.stats import poisson
x = np.arange(0,20)
lambdaa = 4
rv = poisson(lambdaa)
ax = sb.barplot(x=x, y=rv.pmf(x))
import seaborn as sb
import numpy as np
from scipy.stats import poisson
x = np.arange(0,40)
lambdaa = 20
rv = poisson(lambdaa)
ax = sb.barplot(x=x, y=rv.pmf(x))
(a generalisation of the binomial distribution)
(a generalisation of the binomial distribution)
(a generalisation of the binomial distribution)
(a generalisation of the binomial distribution)
(a generalisation of the binomial distribution)
(binomial distribution)