Let \(x_1, x_2, …x_n\) be i.i.d. random variables that follow the Poisson distribution with parameter \(\lambda\), i.e. \(f(x;\lambda)=\dfrac{e^{-\lambda}\lambda^x}{x!}\).
(10 points) Find the methods of moments estimator for \(E[x_i]=\lambda\).
(10 points) Is this estimate unbiased? (show your work)
(10 points) Write an R function that would yield Methods of moments estimate for sample mean of a random sample of iid Poisson variables.
Argument: A vector of $X$ values
Output: MM estimate of $E[x_i]=\lambda$
(5 points) Use your function and \(x\) defined below to calculate the MM estimate of \(\lambda\).
set.seed(1)
x=rpois(100, 3.6)
Methods of Moments Estimator
The method of moments is a statistical technique for estimating unknown parameters of a probability distribution. The idea is to match the sample moments of the data to the corresponding theoretical moments of the distribution. In this case, the sample mean is x=n1∑i=1nxi, and the theoretical mean of a Poisson distribution with parameter λ is E[xi]=λ. Therefore, the method of moments estimator for λ is simply the sample mean:
λ^=x
Unbiasedness
An estimator is said to be unbiased if the expected value of the estimator is equal to the true value of the parameter being estimated. In this case, the expected value of the method of moments estimator is
E[λ^]=E[x]=E[n1i=1∑nxi]=n1i=1∑nE[xi]=n1i=1∑nλ=λ
Therefore, the method of moments estimator is unbiased.
R Function
Here is an R function that calculates the method of moments estimator for the mean of a Poisson distribution:
MM Estimate of λ
Using the R function mm_estimate
, we can calculate the MM estimate of λ as follows:
set.seed(1)
x <- rpois(100, 3.6)
mm_estimate(x)