From a19eaf6684811885bab8de71e565339eeba858e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Wed, 18 Dec 2024 11:47:28 +0100 Subject: [PATCH] fix: correct probability calculations for bus waiting times - Corrected the calculation of P(10 <= X <= 15) to use the correct interval length. - Corrected the calculation of P(25 <= X <= 30) to use the correct interval length. - Corrected the calculation of P(0 < X < 5) to use the correct interval length. - Corrected the calculation of P(15 < X < 20) to use the correct interval length. --- TD1/Exercice56.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TD1/Exercice56.R b/TD1/Exercice56.R index 9e32414..5a7d352 100644 --- a/TD1/Exercice56.R +++ b/TD1/Exercice56.R @@ -10,17 +10,17 @@ temps_total <- 30 # Proba n'importe quel minute p_min <- 1 / temps_total # Calcul de P(10 <= X <= 15) -p10_X_15 <- 5 * p_min +p10_X_15 <- (15-10) * p_min # Calcul de P(25 <= X <= 30) -p25_X_30 <- 5 * p_min +p25_X_30 <- (30-25) * p_min # Calcul p_moins_5_min p_moins_5_min <- p10_X_15 + p25_X_30 print(p_moins_5_min) # Calcul de P(0 < X < 5) -p0_X_5 <- 4 * p_min +p0_X_5 <- (5-(0+1)) * p_min # Calcul de P(15 < X < 20) -p15_X_20 <- 4 * p_min +p15_X_20 <- (20-(15+1)) * p_min # Calcul p_plus_de_10_min p_plus_de_10_min <- p0_X_5 + p15_X_10 print(p_plus_de_10_min)