# Answer to Question #86839 in Electrical Engineering for Anand

Question #86839

Let X₁,X₂ ,...,Xₙ be a random sample from a Binomial distribution with parameters n and p, both unkown. Obtain estimators of n and p, using method of moments.

Expert's answer

Since we know that

@$\text{E}[x]=np,@$@$\text{Var}[x]=np(1-p),@$

we can express @$p@$ and @$n@$ so that they are

@$p=1-\frac{\text{Var}[x]}{\text{E}[x]},@$@$n=\frac{\text{E}[x]}{p}=\frac{\text{E}^2[x]}{\text{E}[x]-\text{Var}[x]}.@$

On the other hand, we know that sample mean and sample variance are:

@$\text{E}[x]=x_\mu=\frac{1}{n}\sum_{i=1}^{n}x_i,@$@$\text{Var}[x]=S(x)=\frac{1}{n}\sum^{n}_{i=1}(x_i-x_\mu)^2,@$

hence

@$p=1-\frac{\frac{1}{n}\sum^{n}_{i=1}(x_i-x_\mu)^2}{\frac{1}{n}\sum_{i=1}^{n}x_i},@$@$n=\frac{(\frac{1}{n}\sum_{i=1}^{n}x_i)^2}{\frac{1}{n}\sum_{i=1}^{n}x_i-\frac{1}{n}\sum^{n}_{i=1}(x_i-x_\mu)^2}.@$

## Comments

## Leave a comment