Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cnt = 0
- for (i in 1:500) {
- x = rnorm(500,0,1)
- y = t.test(x,conf.level = 0.9)
- if(y$conf.int[1] <= 0) {
- if(y$conf.int[2] >= 0){
- cnt = cnt + 1
- }
- }
- }
- cnt/500.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement