R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) R est un logiciel libre livré sans AUCUNE GARANTIE. Vous pouvez le redistribuer sous certaines conditions. Tapez 'license()' ou 'licence()' pour plus de détails. R est un projet collaboratif avec de nombreux contributeurs. Tapez 'contributors()' pour plus d'information et 'citation()' pour la façon de le citer dans les publications. Tapez 'demo()' pour des démonstrations, 'help()' pour l'aide en ligne ou 'help.start()' pour obtenir l'aide au format HTML. Tapez 'q()' pour quitter R. > date() [1] "Thu Sep 22 16:14:33 2011" > ################################################### > ### chunk number 2: valnorm > ################################################### > #line 89 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > qnorm(0.025) [1] -1.959964 > qnorm(0.975) [1] 1.959964 > > > ################################################### > ### chunk number 3: graphencr > ################################################### > #line 99 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > xx <- seq(-3,3,le=100) > plot(xx,pnorm(xx),type="l",xlab="valeurs",ylab="quantiles",main="Loi Normale Centrée Réduite") > abline(h=0) > abline(h=1) > segments(0,0,0,0.5,col="blue",lty=2) > segments(-3.3,0.5,0,0.5,col="blue",lty=2) > segments(qnorm(0.025),0,qnorm(0.025),0.025,col="red") > segments(-3.3,0.025,qnorm(0.025),0.025,col="red") > segments(qnorm(0.975),0,qnorm(0.975),0.975,col="red") > segments(-3.3,0.975,qnorm(0.975),0.975,col="red") > > > ################################################### > ### chunk number 4: valt9 > ################################################### > #line 129 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > qt(0.025,9) [1] -2.262157 > qt(0.975,9) [1] 2.262157 > > > ################################################### > ### chunk number 5: graphet > ################################################### > #line 135 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > xx <- seq(-3,3,le=100) > plot(xx,pt(xx,9),type="l",xlab="valeurs",ylab="quantiles", main="Loi de Student à 9 ddl") > abline(h=0) > abline(h=1) > segments(0,0,0,0.5,col="blue",lty=2) > segments(-3.3,0.5,0,0.5,col="blue",lty=2) > segments(qt(0.025,9),0,qt(0.025,9),0.025,col="red") > segments(-3.3,0.025,qt(0.025,9),0.025,col="red") > segments(qt(0.975,9),0,qt(0.975,9),0.975,col="red") > segments(-3.3,0.975,qt(0.975,9),0.975,col="red") > > > ################################################### > ### chunk number 6: valt70 > ################################################### > #line 154 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > qt(0.025,70) [1] -1.994437 > qt(0.975,70) [1] 1.994437 > > > ################################################### > ### chunk number 7: binfm > ################################################### > #line 160 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > 177+qt(0.025,70)*sqrt(31.98/70) [1] 175.6519 > > > ################################################### > ### chunk number 8: bsupm > ################################################### > #line 164 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > 177+qt(0.975,70)*sqrt(31.98/70) [1] 178.3481 > > > ################################################### > ### chunk number 9: ficm > ################################################### > #line 169 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > icmoyenne <- function(emoy,evar,eeff,nivconf){ + int <- (1-nivconf)/2 + binf <- emoy+qt(int,eeff-1)*sqrt(evar/eeff) + bsup <- emoy+qt(1-int,eeff-1)*sqrt(evar/eeff) + bornes <- c(binf, bsup) + return(bornes) + } > icmoyenne(177,31.98*71/70,71,0.95) [1] 175.6519 178.3481 > > > ################################################### > ### chunk number 10: bicp > ################################################### > #line 199 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > 0.85+qnorm(0.025)*sqrt(0.85*(1-0.85)/400) [1] 0.8150076 > 0.85+qnorm(0.975)*sqrt(0.85*(1-0.85)/400) [1] 0.8849924 > > > ################################################### > ### chunk number 11: ficp > ################################################### > #line 207 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > icproportion <- function(eprop,eeff,nivconf){ + int <- (1-nivconf)/2 + binf <- eprop+qnorm(int)*sqrt(eprop*(1-eprop)/eeff) + bsup <- eprop+qnorm(1-int)*sqrt(eprop*(1-eprop)/eeff) + bornes <- c(binf, bsup) + return(bornes) + } > icproportion(340/400,400,0.95) [1] 0.8150076 0.8849924 > > > ################################################### > ### chunk number 12: databask > ################################################### > #line 221 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > taibask <- c(2.08, 2.01, 2.03, 2.10, 1.98, 2.08, 1.85, 2.03, 2.16, 2.01, 1.91, 1.88) > > > ################################################### > ### chunk number 13: resbask > ################################################### > #line 232 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > emoy <- mean(taibask) > var(taibask) [1] 0.0086 > eeff <- 12 > evar <- var(taibask) > icmoyenne(emoy,evar,12,0.95) [1] 1.951078 2.068922 > icmoyenne(emoy,evar,12,0.99) [1] 1.926856 2.093144 > 1-pnorm(2.05,mean(taibask),sd(taibask)) [1] 0.3331138 > > > ################################################### > ### chunk number 14: mariage > ################################################### > #line 277 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > distance <- seq(1,19,by=2) > couples <- c(138,384,210,103,63,28,20,19,12,9) > barplot(couples, names.arg=as.character(distance),cex.names=0.8) > eeff <- sum(couples) > emoy <- sum(couples*distance)/eeff > evar <- sum(couples*((distance-emoy)^2))/(eeff-1) > icmoyenne(emoy,evar,eeff,0.95) [1] 4.699327 5.150571 > > > ################################################### > ### chunk number 15: impulsion > ################################################### > #line 295 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > eeff = 517+131 > eeff [1] 648 > eprop = 131/eeff > eprop [1] 0.2021605 > eprop+qnorm(0.025)*sqrt(eprop*(1-eprop)/eeff) [1] 0.1712386 > eprop+qnorm(0.975)*sqrt(eprop*(1-eprop)/eeff) [1] 0.2330824 > > > ################################################### > ### chunk number 16: incimpulse > ################################################### > #line 303 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > icproportion(eprop,eeff,0.95) [1] 0.1712386 0.2330824 > > > ################################################### > ### chunk number 17: ichandicap > ################################################### > #line 312 "/bge/penel/verif_pedadoc/pedadoc/fichestd/tdr27//tdr27.rnw" > icproportion(29/45,45,0.95) [1] 0.5045861 0.7843028 > > > > proc.time() utilisateur système écoulé 0.364 0.036 0.389