################################### # Exercice 1 #################################### #1 pt(0.45,15) #2 pt(2.5,15)-pt(-1.1,15) #3 qt(0.25,15) ################################### # Exercice 2 #################################### # importer et renommer les donnees pour lisibilite attente<- read_csv("Donnees-loi-student-calcul-probabilite-Exercice2.csv") #1. # Moyenne et s moy<-mean(attente$temps_attente) med<-median(attente$temps_attente) s<-round(sd(attente$temps_attente),1) # Histogramme hist(attente$temps_attente, probability = TRUE, main = "Histogramme avec densité normale", xlab = "Temps d'attente (minutes)", col = "lightblue", border = "white") # ajouter la courbe normale x <- seq(min(attente$temps_attente), max(attente$temps_attente), length = 100) y <- dnorm(x, mean = moy, sd = s) lines(x, y, col = "red", lwd = 2) #2. psup85<-round(pnorm(85, mean = moy, sd = s,lower.tail = FALSE),4) psup85 #3. n<-nrow(attente) z<-round((85-moy)/s,4) psup85_student<-round(pt(z,n-1,lower.tail = FALSE),4) psup85_student #4-b t <- (moy - 85) / (s / sqrt(n)) t pinft<-round(pt(t, df = 19),4) pinft