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 the 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 the 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)