asked 217k views
1 vote
You generate a sample using the following code: x=2∗rnorm(1000,0,10)+1 Which statement is correct about the sample? Hint: You may want to plot the histogram of x and check its sample mean and variance.

1. it has size n=1000 and follows normal distribution with mean =1 and variance =100
2. it has size n=1000 and follows normal distribution with mean =0 and variance =100
3. it has size n=1000 and follows normal distribution with mean =1 and variance =400
4. it has size n=2001 and follows normal distribution with mean =1 and variance =200

asked
User Jalopezp
by
7.9k points

1 Answer

6 votes

Final answer:

The sample generated by the given code has a size n=1000 and follows a normal distribution with a mean of 1 and a variance of 400, not 100.

Step-by-step explanation:

The code provided x = 2 * rnorm(1000,0,10) + 1 is used to generate a random sample of size n=1000 from a normal distribution where the mean (μ) is 0 and the standard deviation (σ) is 10. However, because each value from the generated normal distribution is multiplied by 2 and then 1 is added, the mean of the sample will be transformed accordingly. The new mean will be 2*0+1 = 1. The standard deviation will be affected by the multiplication but not the addition, hence the new standard deviation will be 2*10 = 20, making the variance 20^2 = 400. Therefore, the correct statement about the sample is that it has size n=1000 and follows a normal distribution with mean = 1 and variance = 400.

answered
User Dyppl
by
8.3k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.