Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

R Programming problem. I guess you dont have to do all of it, just help me start

ID: 658860 • Letter: R

Question

R Programming problem. I guess you dont have to do all of it, just help me start out the function for (a) and b. Thanks

In this problem, we will randomly sample from a dataset which is built into R, calculate the mean for many random samples, and use this to explore the distribution of the mean. The dataset we will be working with is the built-in dataset Lynx, which can be accessed with this code: lynx = as. numeric(lynx) Use this data and perform the following tasks: Build a function that randomly samples (without replacement) n times from lynx, and calculates the average for the sample. Have your function return the average. Report the average when n = 100. Run your function in (a) with n = 10, for a total of N = 1000 times. I.e, you should have 1000 means of random samples of size 10. Report the histogram for these 1000 sample means. Find the average and standard deviation of lynx. Find the average and standard deviation of the 1000 means from (b).

Explanation / Answer

?acf acf(lynx) lynx.data