You are viewing a single comment's thread. Return to all comments →
TĐH p=4/5 from math import comb
n=4 k1=3 k2=4 print(round(comb(n,k1)*pow(p,k1)*pow(1-p,n-k1)+comb(n,k2)*pow(p,k2)*pow(1-p,n-k2)),3) n=4 k1=1 k2=0 print(round(comb(n,k1)*pow(p,k1)*pow(1-p,n-k1)+comb(n,k2)*pow(p,k2)*pow(1-p,n-k2),3))
Seems like cookies are disabled on this browser, please enable them to open this website
Binomial Distribution #1
You are viewing a single comment's thread. Return to all comments →
TĐH p=4/5 from math import comb
P(X>2)=P(X=3)+P(X=4)=kCn*p(k)*(1-p)^(n-k)
n=4 k1=3 k2=4 print(round(comb(n,k1)*pow(p,k1)*pow(1-p,n-k1)+comb(n,k2)*pow(p,k2)*pow(1-p,n-k2)),3) n=4 k1=1 k2=0 print(round(comb(n,k1)*pow(p,k1)*pow(1-p,n-k1)+comb(n,k2)*pow(p,k2)*pow(1-p,n-k2),3))