Bootstrapping the Sample Mean: - PowerPoint PPT Presentation

1 / 1
About This Presentation
Title:

Bootstrapping the Sample Mean:

Description:

Bootstrapping the Sample Mean: library(bootstrap) data(mouse.c) print(mouse.c) [1] 52 104 146 10 50 31 40 27 46 x – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 2
Provided by: msar8
Category:

less

Transcript and Presenter's Notes

Title: Bootstrapping the Sample Mean:


1
Bootstrapping the Sample Mean
  • library(bootstrap)
  • data(mouse.c)
  • print(mouse.c)
  • 1 52 104 146 10 50 31 40 27 46
  • x lt- mouse.c
  • print(theta.hat lt- mean(x))
  • 1 56.22222
  • nboot lt- 1000
  • theta.star lt- double(nboot)
  • for(i in 1nboot)
  • x.star lt- sample(x, replace TRUE)
  • theta.stari lt- mean(x.star)
  • hist(theta.star)
  • abline(v theta.hat, lty 2)
  • sd(theta.star)
  • 1 13.20006
  • theoretical value for comparison
Write a Comment
User Comments (0)
About PowerShow.com