Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions