Use Rstudio code. Please show the code in R studio(R) and
screenshot it. Thank you!
Problem 3 (R - 19 points). You have learned in probability that the sampling distribution of Xn is not normally distributed when X; * N (1,0). However, Central Limit Theorem tells us that the distribution should converge to a normal distribution in the limit as n, the sample size, grows to infinity. In this problem, you will investigate this visually, and by comparing probabilities calculated from CLT and from simulation. Parts (a)- (b) require plotting, but all other parts can be completed independently without these graphs. The Weibull distribution is defined by two parameters: shape (a > 0) and scale (B > 0) and has the following density function: Q-1 а f(xla, 3) = ; (?). | e-(x/B)", > 0 Weibull distributed random variables have the following expected value and variance: E(X) = B. 1(1+1/a) V(X) = B2. (I (1 + 2/a) – (1(1+1/a))?) - [(y) is the Gamma function, and can be tricky to compute if y is not a positive integer. Instead, you can calculate the values using R using the gamma(y) function. See ?gamma for usage information.
c) This step is to help you note the necessary components in CLT but is allotted any points. Compute the exact expected value and variance of X, for each sample size you have in (b). Then, create a tibble that displays for each sample size the following row information: n, E(Xn), V(Xn). Print the tibble. For example: n 20 40 E(Xn) V(Xn) 0.5 0.25 0.5 0.0625 d) (3 points) Let's examine the consequences when we use Central Limit Theorem without veri- fying that a normal approximation is reasonable! Using n = 20, state the normal distribution you would use according to Central Limit Theo- rem. Use this to estimate the probability the sample mean is between 4 and 6. Estimate this probability again using the simulated pool of sample means for n = 20. How does the normal approximation compare with the simulated probability? Be detailed in your comparison (e.g. Are they similar? Different? How different?)
Use Rstudio code. Please show the code in R studio(R) and screenshot it. Thank you!
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am