Question

To use R/Rstudio do it "some require": set.seed(123) ,to use 123 (a) Simulate a sample of...

To use R/Rstudio do it

"some require": set.seed(123) ,to use 123


(a) Simulate a sample of size n = 30 from N(1,32), and calculate the sample variance.
(b) Plot the histogram of your simulated sample in part (a) with option breaks=10.
(c) Repeat (a) 100 times using a for loop, so you will have 100 sample variances. Plot the histogram of the 100 sample variances.
(d) Calculate the mean and the variance of the 100 sample variances in part (c). Is the mean close to 9?

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
To use R/Rstudio do it (a) Simulate a sample of size n = 30 from N(1,32),...
To use R/Rstudio do it (a) Simulate a sample of size n = 30 from N(1,32), and calculate the sample variance. (b) Plot the histogram of your simulated sample in part (a) with option breaks=10. (c) Repeat (a) 100 times using a for loop, so you will have 100 sample variances. Plot the histogram of the 100 sample variances. (d) Calculate the mean and the variance of the 100 sample variances in part (c). Is the mean close to 9?
R Simulation: For n = 10, simulate a random sample of size n from N(µ,σ2), where...
R Simulation: For n = 10, simulate a random sample of size n from N(µ,σ2), where µ = 1 and σ2 = 2; compute the sample mean. Repeat the above simulation 500 times, plot the histogram of the 500 sample means (does it mean that I can just use hist() method instead of plot() method). Now repeat the 500 simulations for n = 1,000. Compare these two sets of results with different sample sizes, and discuss it in the context...
Using R programming language, complete the following. 1. Generate the bivariate normal sample of size 100...
Using R programming language, complete the following. 1. Generate the bivariate normal sample of size 100 with parameters a. marginal mean of X equal to 1, b. marginal mean of Y equal to 2, c. marginal variance of X equal to 3, d. marginal variance of Y equal to 4, e. correlation between X and Y equal to -1/2. You can use the function mvrnorm(), first installing its package by the code if (! require ("MASS")) install.packages("MASS"); library ("MASS") 2....
Feel free to use Minitab or Excel on all aspects of this. a) Collect a sample...
Feel free to use Minitab or Excel on all aspects of this. a) Collect a sample of n=50 data values for which you can observe some variation. Describe the source of the data, that is, how did you get it? (If all the data are the same with no variation, you aren’t measuring carefully enough). b) Make a histogram of your 50 data values, and comment on the location, spread and shape. c) Calculate the mean and standard deviation of...
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly...
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly 4 times in 10 flips of a fair coin. One way to generate a flip of the coin is to create a vector in R with all of the possible outcomes and then randomly select one of those outcomes. The sample function takes a vector of elements (in this case heads or tails) and chooses a random sample of size elements. coin <- c("heads","tails")...
R Programming: a.Choose 10 random values of X having the Normal(4, 1) distribution. Use t.test to...
R Programming: a.Choose 10 random values of X having the Normal(4, 1) distribution. Use t.test to compute the 95% confidence interval for the mean. Is 4 in your confidence interval? b.Replicate the experiment in part a 10,000 times and compute the percentage of times the population mean 4 was included in the confidence interval. c.Repeat part b, except sample your 10 values when X has the Exponential(1/4) distribution. What is the mean of X? What percentage of times did the...
Use R. Generate a random sample with n=15 random observations from an exponential distribution with mean=1....
Use R. Generate a random sample with n=15 random observations from an exponential distribution with mean=1. Calculate the sample median, which is an estimator of the population median. Use bootstrap (nonparametric, with B=1000) methods to estimate the variance of the estimator for the population median. use the Monte Carlo method, e.g. generate 1000 samples of size 15 to estimate the true variance of the median estimator. Compare and comment on your results.
PLEASE USE R CODE!! Continue to generate standard normal random variables until you have generated n...
PLEASE USE R CODE!! Continue to generate standard normal random variables until you have generated n of them, where n≥100 is such that S/sqrt(n) <0.1, where S is the sample standard deviation of the n data value. (a)How many normals do you think will be generated? (b)What is the sample mean of all the normals generated? (c)What is the sample variance?
-0.021 0.029 -0.009 -0.002 0.002 -0.006 0.006 -0.064 0.023 0.031 Table 1: A sample of FIR...
-0.021 0.029 -0.009 -0.002 0.002 -0.006 0.006 -0.064 0.023 0.031 Table 1: A sample of FIR Your friend seek help from you to use your knowledge from TSTA602 to assist Bank X to do the following data analysis. Please write a report to answer all the following questions. (a). calculate (mannually) the sample mean, and sample standard de- viation for the sample in Table 1. (b). if we draw samples of sizes 10 many times and form a distribution of...
A sample of 26 offshore oil workers took part in a simulated escape exercise, resulting in...
A sample of 26 offshore oil workers took part in a simulated escape exercise, resulting in the accompanying data on time (sec) to complete the escape. 389 356 359 364 376 424 326 395 403 373 374 371 365 366 365 325 339 394 393 369 375 359 357 403 335 397 A normal probability plot of the n = 26 observations on escape time given above shows a substantial linear pattern; the sample mean and sample standard deviation are...