Question: Homework 2 1. In this question you'll explore some pieces of density estimators. (a) First consider the kernel functions: calculate K2 for the uniform, Epanechnikov,

Homework 2 1. In this question you'll explore some pieces of density estimators. (a) First consider the kernel functions: calculate K2 for the uniform, Epanechnikov, biweight and Gaussian kernels. Can you explain why, even though K2u, K2e, K2b and K2g are very different, they are unlikely to play a large role in determining the quality of the resulting density estimate? (b) Next, suppose that we are estimating a standard normal density (in practice, we wouldn't know that). For a given bandwidth h, calculate the bias of estimates f using the different kernels from the previous part, at the median of the distribution, one standard deviation above the median, and two standard deviations above it. What is common to all the biases? What does the pattern tell us about the estimates? (c) Now, focus on the Epanechnikov kernel. Calculate the mean squared error of estimating a standard normal density at x = 0, 1 and 2. These answers will be functions of a bandwidth h and sample size n (and x). Discuss how the MSE depends on these variables vary them to illustrate how the MSE changes. (d) Now let's see if/how well the theory works. Run a simulation experiment to test it. First, generate one sample of 200 standard normal observations and use it to estimate a bandwidth that you'll use in the experiment to come!. Then for each of R repetitions, generate a sample of 200 standard normal random observations and calculate density estimates at 0, 1 and 2 using an Epanechnikov kernel density estimator and your chosen bandwidth. Use the average of the R estimates to find the empirical bias of your estimator at 0, 1 and 2. Homework 2 1. In this question you'll explore some pieces of density estimators. (a) First consider the kernel functions: calculate K2 for the uniform, Epanechnikov, biweight and Gaussian kernels. Can you explain why, even though K2u, K2e, K2b and K2g are very different, they are unlikely to play a large role in determining the quality of the resulting density estimate? (b) Next, suppose that we are estimating a standard normal density (in practice, we wouldn't know that). For a given bandwidth h, calculate the bias of estimates f using the different kernels from the previous part, at the median of the distribution, one standard deviation above the median, and two standard deviations above it. What is common to all the biases? What does the pattern tell us about the estimates? (c) Now, focus on the Epanechnikov kernel. Calculate the mean squared error of estimating a standard normal density at x = 0, 1 and 2. These answers will be functions of a bandwidth h and sample size n (and x). Discuss how the MSE depends on these variables vary them to illustrate how the MSE changes. (d) Now let's see if/how well the theory works. Run a simulation experiment to test it. First, generate one sample of 200 standard normal observations and use it to estimate a bandwidth that you'll use in the experiment to come!. Then for each of R repetitions, generate a sample of 200 standard normal random observations and calculate density estimates at 0, 1 and 2 using an Epanechnikov kernel density estimator and your chosen bandwidth. Use the average of the R estimates to find the empirical bias of your estimator at 0, 1 and 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
