Question: In the R - code provided ( which is below ) , do the following: n = 3 0 biased _ sample _ variances =

In the R-code provided (which is below), do the following:
n=30
biased_sample_variances=rep(NA,100)
unbiased_estimate=rep(NA,100)
for(i in 1:100){
x=rnorm(n,sd=sqrt(2))
biased_sample_variances[i]=sum((x-mean(x))^2)/n
unbiased_estimate[i]=sum((x-mean(x))^2)/(n-1)
}
a) Provide an intuitive explanation for what the code is doing.
b) Provide code to estimate the bias and the variance of the two estimates calculated. How close are these to what we would expect?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!