X服从两点分布P(X=0)=1-p,P(X=1)=p则D(X)=?

问题描述:

X服从两点分布P(X=0)=1-p,P(X=1)=p则D(X)=?

E(X)=0*(1-p)+1*p=p
D(X)=E(X^2)-E^2(X)=p-p^2