From 22364881983c429f2e4ec9483874087e536e3eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Fri, 14 Mar 2025 10:20:45 +0100 Subject: [PATCH] fix: remove calculation of expected counts to streamline chi-squared test --- TP_estimateurs/Exercice1.R | 1 - 1 file changed, 1 deletion(-) diff --git a/TP_estimateurs/Exercice1.R b/TP_estimateurs/Exercice1.R index 5429d8d..779925a 100644 --- a/TP_estimateurs/Exercice1.R +++ b/TP_estimateurs/Exercice1.R @@ -184,7 +184,6 @@ mids <- hist_obj$mids # Calcul des probabilités attendues total_count <- sum(observed_counts) expected_probs <- diff(pnorm(breaks, mean = moyenne, sd = ecart_type)) -expected_counts <- total_count * expected_probs # Perform chi-squared test chitest <- chisq.test(observed_counts, p = expected_probs, rescale.p = TRUE)