Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Could anyone help me to type the code (Rstudio) ? Let X be a Possion(A) random variable. We have seen in class that. E(X) =
Could anyone help me to type the code (Rstudio) ?
Let X be a Possion(A) random variable. We have seen in class that. E(X) = Var(X) = X. Suppose that we do not know the true value of A and want to estimate it from observed data {r1, r2,..., xn}. There are two possible ways to do estimate A: use the sample mean r = use the sample variance S = (ri 1)? Please note that in sample variance, the denominator is n 1 instead of n. In this assignment, you will compare the two estimators. In the following questions, we assume that A = 10. 1. Generate n = 10 independent Poisson(A) random variables, calculate the sample mean (you can use rpois (n = ,lambda = ) function in R, where n is the total number of random varables generated and lambda is the parameter A). Do the above 1000 times, then you have 1000 observations of the sample mean (each of them is calculated from n = 10 independent Poisson (A) random variables.) Generate the boxplot and histogram of the 1000 observation of sample means. 2. For n = 10, repeat Part 1 with the sample variance. 3. Compare the boxplot and histogram you obtained from Part 1 and 2. Comment on the difference between them. (Hint: measure of dispersion)
Step by Step Solution
★★★★★
3.41 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
Rcode For Analysis smeanrep01000 svariancerep01000 for j in 11000 genrpois10lambda 10 smeanjmeangen ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started