You may use code to solve these problems. You may then sketch what your plots show, or add the plots to this homework and submit a pdf digitally (email).
Problem 1. Suppose the data are
[1, 1.75, 2, 3, 3.25, 4].
h = 0.2h = 1.84 * SD * n**(-0.2).Problem 2. Suppose the data
X = [-1, -0.5, 0, 0.5, 1] were drawn from a standard Normal
distribution.
h = 0.6, compute the
realized KDE at x = 0, f_hat_h(0), directly
from these five numbers.E[f_hat_h(0)] at the same
h = 0.6.x=0, using the Normal
distribution.E[f_hat_h] to the Normal distribution for all x;
calculating this at one point is only an indication of what is going on
that you can extrapolate from.)E[f_hat_h(0)] from (b) at a much smaller
bandwidth, h = 0.1. What happens to the gap between
E[f_hat_h(0)] and f(0) as h
shrinks?f_hat_h a consistent estimator? Explain your
reasoning.h?Problem 3. Suppose the data are
X = [5, 7, 7, 8, 10], and fix the bandwidth at
h = 1.5 for both kernels below.
f_hat_h(x), at
x = 6.0, x = 6.5, x = 7.0,
x = 8.0, and x = 8.5.x, using the same h = 1.5.Problem 4. Load
./data/heart_failure_clinical_records_dataset.csv.
ejection_fraction.df.sample(frac=1.0, replace=True) to
resample the data 15 times with replacement, plotting the kernel density
estimtes for each sample.ejection_fraction is the original
plot reliable? For which values is there noticeable variation in your
plots of the resampled data?