• + 0 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))