Question: How do you do this R-code problem? Obtain an approximation to the t distribution by Monte Carlo simulation. To fix ideas, let n=10. Step S:

How do you do this R-code problem?

Obtain an approximation to the t distribution by Monte Carlo simulation. To fix ideas, let n=10. Step S: Generate X1,...,Xn i.i.d. N(0,1) and compute the t-statistic: T = sqrt{n}* barX / hatSigma where barX is the sample mean and hatSigma the sample standard deviation, i.e., the square root of the sample variance. Repeat Step S many times (say 499 times), and collect the 499 values of T in a vector denoted by VT. Plot a histogram of VT and compare it to a plot of the t distribution with m=n-1. Also compute the Monte Carlo approximation to qt(0.975,m) by using the R command: quantile(VT, 0.975).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!