5. We can use the function rt(n = 100, df = 2) to generate a random sample from a t-distribution with two degrees of freedom. The sample size is 100.
(a). Generate a sample with 1000 observations from a t-distribution with three degrees of freedom in R, and report its 95% sample quantile.
(b). Use a formal test to see whether this sample is from a normal distribution.
(c). Use a QQ plot to check the normality of this sample.
(d). Generate a sample with 1000 observations from a t-distribution with 100 degrees of freedom, and repeat questions (a) to (d).