Since we know that
E[x]=np,
Var[x]=np(1−p), we can express p and n so that they are
p=1−E[x]Var[x],n=pE[x]=E[x]−Var[x]E2[x].
On the other hand, we know that sample mean and sample variance are:
E[x]=xμ=n1i=1∑nxi,
Var[x]=S(x)=n1i=1∑n(xi−xμ)2, hence
p=1−n1∑i=1nxin1∑i=1n(xi−xμ)2,
n=n1∑i=1nxi−n1∑i=1n(xi−xμ)2(n1∑i=1nxi)2.
Comments