# Intervalle de confiance a 95 pc d'une moyenne sur petit echantillon
ech<-sample(1:50,10,replace=TRUE)
bootstrap(ech,function(x,i) mean(x[i]))
# La meme chose avec un intervalle de confiance a 99 pc
bootstrap(ech,function(x,i) mean(x[i]),conf.level=0.99)
# Un calcul (un peu) plux complexe, l'intervalle de confiance de l'erreur standard
# de la moyenne
bootstrap(ech,function(x,i) sd(x[i])/sqrt(length(x[i])))
Run the code above in your browser using DataLab