1. Importer les données

don <- read.table("https://r-stat-sc-donnees.github.io/poulpeF.csv",header=TRUE)
summary(don)
     Poids       
 Min.   :  40.0  
 1st Qu.: 300.0  
 Median : 545.0  
 Mean   : 639.6  
 3rd Qu.: 800.0  
 Max.   :2400.0  

2. Estimation des paramètres (moyenne, écart-type)

mean(don$Poids)
[1] 639.625
sd(don$Poids)
[1] 445.8965

3. Distribution des données

hist(don$Poids,main="Distribution des poids",nclass=12,freq=FALSE,xlab="Poids",ylab="")
lines(density(don$Poids),col="red")

require(ggplot2)
ggplot(don)+aes(x=Poids,y=..density..)+geom_histogram(bins=12)+ylab("")+
  geom_line(stat="density",col="red")+ggtitle("Distribution des poids")

4. Construire l’intervalle de confiance

t.test(don$Poids,conf.level=0.95)$conf.int
[1] 582.9252 696.3248
attr(,"conf.level")
[1] 0.95
LS0tDQp0aXRsZTogIkludGVydmFsbGUgZGUgY29uZmlhbmNlIGQndW5lIG1veWVubmUiDQphdXRob3I6ICJIdXNzb24gZXQgYWwuIg0KZGF0ZTogIjA1LzA5LzIwMTgiDQpvdXRwdXQ6DQogIGh0bWxfbm90ZWJvb2s6DQogICAgdG9jOiB5ZXMNCiAgICB0b2NfZGVwdGg6IDMNCiAgICB0b2NfZmxvYXQ6IHllcw0KICBodG1sX2RvY3VtZW50Og0KICAgIHRvYzogeWVzDQogICAgdG9jX2RlcHRoOiAnMycNCiAgICB0b2NfZmxvYXQ6IHllcw0KLS0tDQoNCiMgMS4gSW1wb3J0ZXIgbGVzIGRvbm7DqWVzDQoNCmBgYHtyfQ0KZG9uIDwtIHJlYWQudGFibGUoImh0dHBzOi8vci1zdGF0LXNjLWRvbm5lZXMuZ2l0aHViLmlvL3BvdWxwZUYuY3N2IixoZWFkZXI9VFJVRSkNCnN1bW1hcnkoZG9uKQ0KYGBgDQojIDIuIEVzdGltYXRpb24gZGVzIHBhcmFtw6h0cmVzIChtb3llbm5lLCDDqWNhcnQtdHlwZSkNCg0KYGBge3J9DQptZWFuKGRvbiRQb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