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