# NOT RUN {
# Sample 43 observations from a population of 200 numbers, and compute the 95% confidence interval.
pop = sqrt(1:200) ; x1 = sample( pop, 43 ) ; print(sort(x1))
CI.t.test( x1, fpc = 1-length(x1)/length(pop) )
# Sample 14 observations from a Normal(mean=50, sd=5) distribution,
# and compute the 90% confidence interval.
x2 = rnorm( 14, 50, 5 ) ; print(sort(x2))
CI.t.test( x2, 0.9 )
# }
Run the code above in your browser using DataLab