Question

Hello, I'm confused about how to set-up a boostrap sample without having an X and Y...

Hello, I'm confused about how to set-up a boostrap sample without having an X and Y or dataset to use? Do i use dnorm and set that against rnorm? this is in R. Please help. Thank yoou :)

Use the rnorm() function to generate random sample size 10 from the normal distribution with mean 0 and standard deviation of 2

Find the bootstrap estimate of standard error of sample mean, SE(¯ c x ∗ 10). Use 2000 bootstrap samples.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Yes you can very well do this in R

I'll give you an outline and then give you the code. Hope that will make you understand.

Step 1. Generate 10 observations from the normal distribution with mean zero and standard deviation 2.

Calculate it's mean and repeat this process 2000 times. Thus you will get 2000 means from 2000 random samples drawn from the said distribution. The code is as follows.

x_bar=c()

for(i in 1:2000)

{

xi=rnorm(20,0,2)

x_bar[i]=mean(xi)

}

x_bar

Step 2. So, you have obtained the vector or means , that is the vector "x_bar" that contains 2000 sample means.

Therefore a estimate of standard error would be the standard deviation of this x_ bar vector , considering that these values have come from the distribution of sample means. The last part of the code is.

sd(x_bar) #estimate of the standard error.

Add a comment
Know the answer?
Add Answer to:
Hello, I'm confused about how to set-up a boostrap sample without having an X and Y...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT