Show with R source code Use 500 samples of size k where k = 10 and 50 from the f
ID: 3697408 • Letter: S
Question
Show with R source code
Use 500 samples of size k where k = 10 and 50 from the following distributions:
a) Uniform distribution on interval (0,5)
b) Gamma distribution with =4, =1/2
i. For each part find the empirical mean of the sample means. What is the theoretical values of
expected values of the sample means?
ii. For each part find the variance of sample means. What is the theoretical value of the
variance of the sample means.
iii. Draw a histogram for the means.
iv. Draw the normal probability plot of means
v. Explain you results (using central limit theorem)
Notes:
To generate random numbers you use the following R commands:
a) uniform distribution- “runif(n, min=0, max=1)”
b)gamma distribution “rgamma(n, shape=alpha, scale=beta)
Explanation / Answer
> duration = faithful$eruptions # the eruption durations
> var(duration) # apply the var function
[1] 1.3027
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.