Résolution de l’ex 1 p40 t=c(2:12);N=c(55,90,135,245,403,665,1100,1810,3000,4450,7350) T=data.frame(t,N,y=log(N));T; > T t N y 1 2 55 4.007333 2 3 90 4.499810 3 4 135 4.905275 4 5 245 5.501258…..
Calcul de moyenne et écart-type apply(T,2,mean); t N y 7.000000 1754.818182 6.475094 apply(T,2,sd); 3.316625 2326.625317 1.640357
plot(T$t,T$N)
plot(T$t,T$y)
droite de regression ll=lm(y~t,data=T);ll; Call: lm(formula = y ~ t, data = T) Coefficients: (Intercept) t 3.0142 0.4944
abline(ll);
summary(ll) Call: lm(formula = y ~ t, data = T) Min 1Q Median 3Q Max Residuals: Min 1Q Median 3Q Max -0.08656 -0.02117 0.01500 0.02912 0.04802 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.014162 0.032947 91.49 1.13e-14 *** t 0.494419 0.004289 115.27 1.41e-15 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
summary(ll) suite Residual standard error: 0.04499 on 9 degrees of freedom Multiple R-Squared: 0.9993, Adjusted R-squared: 0.9992 F-statistic: 1.329e+04 on 1 and 9 DF, p-value: 1.413e-15