This question demonstrates the law of large numbers and the central limit theorem. (i) Generate 10,000 draws from a stan
Posted: Wed Jul 06, 2022 12:16 pm
question demonstrates the law of large numbers and the central limit theorem. (i) Generate 10,000 draws from a standard uniform random variable. Calculate the average of the first 500, 1,000, 1,500, 2,000, ..., 9,500, 10,000 and plot them as a line plot. Comment on the result. Hint: the mean of standard uniform random variable is 0.50. (ii) Show that the sample averages of 1000 samples from a standard uniform random variable will approximately normally distributed using a histogram. To do this, you will need to use a for loop. For each iteration 1 from 1000, you want to sample 100 observations from a standard uniform and calculate the sample's mean. You will need to save it into a vector of length 1000. Then, using this vector create a histogram and comment on its appearance. = (iii) Following code from the problem solving session, simulate 1000 OLS estimates of ₁ in the 1 + 0.5xį + Uį where uį is drawn from a normal distribution with mean zero and x² and the x¡ ~ Uniform(0,1) i.e. standard uniform random variable. Calculate the mean and standard deviation of the simulated OLS estimates of 3₁. Is this an approximately unbiased estimator? Plotting the histogram of these estimates, is it still approximately normal? model yi Var(u₂|xi) =
This