Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = 10^5; n = 20; nr.out = numeric(m)
- for (i in 1:m) {
- nr.out[i] = length(boxplot.stats(rnorm(n))$out)}
- mean(nr.out)
- ## 0.33063
- mean(nr.out > 0)
- ## 0.23268
- m = 10^5; n = 50; nr.out = numeric(m)
- for (i in 1:m) {
- nr.out[i] = length(boxplot.stats(rnorm(n))$out)}
- mean(nr.out)
- ## 0.57625
- m = 10^5; n = 100; nr.out = numeric(m)
- for (i in 1:m) {
- nr.out[i] = length(boxplot.stats(rnorm(n))$out)}
- mean(nr.out)
- ## 0.91808
- mean(nr.out > 0)
- ## 0.51877
Add Comment
Please, Sign In to add comment