Next:
Some Probability Distributions
Up:
Some Rweb Notes
Previous:
Selecting a Simple Random
Examining Sampling Distributions
times <-c(43, 45, 53, 56, 56, 57, 58, 66, 67, 73, 74, 79, 80, 80, 81, 81, 81, 82, 83, 83, 84, 88, 89, 91, 91, 92, 92, 97, 99, 99, 100, 100, 101, 102, 102, 102, 103, 104, 107, 108, 109, 113, 114, 118, 121, 123, 126, 128, 137, 138, 139, 144, 145, 147, 156, 162, 174, 178, 179, 184, 191, 198, 211, 214, 243, 249, 329, 380, 403, 511, 522, 598) hist(times) x<-sample(times, 12) mean(x) sd(x) median(x)
times <-c(43, 45, 53, 56, 56, 57, 58, 66, 67, 73, 74, 79, 80, 80, 81, 81, 81, 82, 83, 83, 84, 88, 89, 91, 91, 92, 92, 97, 99, 99, 100, 100, 101, 102, 102, 102, 103, 104, 107, 108, 109, 113, 114, 118, 121, 123, 126, 128, 137, 138, 139, 144, 145, 147, 156, 162, 174, 178, 179, 184, 191, 198, 211, 214, 243, 249, 329, 380, 403, 511, 522, 598) times.sample.mean <- function(n) { mean(sample(times, n)) } x <- sapply(rep(12, 50), times.sample.mean) hist(x) mean(x) sd(x) median(x)
Next:
Some Probability Distributions
Up:
Some Rweb Notes
Previous:
Selecting a Simple Random
Luke Tierney 2006-08-23