bi=BinomialDistribution[n,p]

Mean[bi]

Variance[bi]

n=30

p=0.74

PDF[bi,22]

CDF[bi,19]

1-CDF[bi,14]

CDF[bi,11]-CDF[bi,2]

(∑_(a=3)^11)PDF[bi,a]

Needs["BarCharts`"]

(*potrebujem pole o rozmere 31*)

tab=Array[w,{31}];

Do[
w[i+1]=PDF[bi,i],
{i,0,30}
]

tab

BarChart[tab]

(*SAMOSTATNA PRACA*)

bi=BinomialDistribution[n,p]

Mean[bi]

Variance[bi]

n=20

p=0.9

PDF[bi,15]

CDF[bi,16]

1-CDF[bi,17]

tab=Array[w,{21}];

Do[
w[i+1]=PDF[bi,i],
{i,0,20}
]

tab

BarChart[tab]

(∑_(a=0)^20)w[a+1]

Clear[n]

hy=HypergeometricDistribution[n,M,N]

Mean[hy]

Variance[hy]

(*Priklad*)

vyrobok=HypergeometricDistribution[3,5,15]

PDF[vyrobok,0]

1-PDF[vyrobok,0]

CDF[vyrobok,2]

kosele=HypergeometricDistribution[7,70,500]

PDF[kosele,2]//N

CDF[kosele,1]//N

tab=Array[w,{8}];

Do[
w[i+1]=PDF[kosele,i],
{i,0,7}
]

tab//N

BarChart[tab]

(∑_(a=0)^7)w[a+1]