File: Chapter.5.7.R

package info (click to toggle)
r-cran-learnbayes 2.15-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,064 kB
  • sloc: sh: 16; makefile: 1
file content (8 lines) | stat: -rw-r--r-- 260 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
#########################################################
# Section 5.7 Monte Carlo Method for Computing Integrals
#########################################################

 p=rbeta(1000, 14.26, 23.19)
 est=mean(p^2)
 se=sd(p^2)/sqrt(1000)
 c(est,se)