From 12135f138709a63b4f3b81e866b40eb0e64d330d Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 16:59:30 +0200 Subject: [PATCH 1/5] fix (ML 00 - ex01: TinyStatistician): erreur pour les equations de variance et standard deviation. --- module05/en.subject.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module05/en.subject.tex b/module05/en.subject.tex index 4ab99615..d27a1472 100644 --- a/module05/en.subject.tex +++ b/module05/en.subject.tex @@ -507,7 +507,7 @@ \section*{Instructions} \newline Given a vector $x$ of dimension m * 1 representing the a sample of a data population, the mathematical formula of its variance is: $$ - \sigma^2 = \frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1} = \frac{\sum_{i = 1}^{m}{[x_i - (\frac{1}{m}\sum_{j = 1}^{m}{x_j}})]^2}{m - 1} + \sigma^2 = \frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1} = \frac{\sum_{i = 1}^{m - 1}(x_i - \bar{x})^2} $$ \item \texttt{std(x)}: computes the sample standard deviation of a given non-empty list or array $x$. @@ -517,7 +517,7 @@ \section*{Instructions} \newline Given a vector $x$ of dimension m * 1, the mathematical formula of the sample standard deviation is: $$ - \sigma = \sqrt{\frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1}} = \sqrt{\frac{\sum_{i = 1}^{m}{[x_i - (\frac{1}{m}\sum_{j = 1}^{m}{x_j}})]^2}{m - 1}} + \sigma = \sqrt{\frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1}} = \sqrt{\frac{\sum_{i = 1}^{m - 1}{(x_i - \bar{x})^2}}{m-1}} $$ \end{itemize} From c561d89b6631e9b70cd70467e5e53f21ae694374 Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 17:00:11 +0200 Subject: [PATCH 2/5] increment version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index c5c9ea80..35ca7bea 100644 --- a/version +++ b/version @@ -1 +1 @@ -v4.0.6 +v4.0.7 From fe179ea83ba9a0d0d89c413195f2487ff7f0001f Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 17:07:01 +0200 Subject: [PATCH 3/5] fix (ML 00 - ex01 TinyStatistician): Update formula variance --- module05/en.subject.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module05/en.subject.tex b/module05/en.subject.tex index d27a1472..b6deea2c 100644 --- a/module05/en.subject.tex +++ b/module05/en.subject.tex @@ -507,7 +507,7 @@ \section*{Instructions} \newline Given a vector $x$ of dimension m * 1 representing the a sample of a data population, the mathematical formula of its variance is: $$ - \sigma^2 = \frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1} = \frac{\sum_{i = 1}^{m - 1}(x_i - \bar{x})^2} + \sigma^2 = \frac{\sum_{i = 1}^{m}(x_i - \bar{x})^2}{m - 1} = \frac{\sum_{i = 1}^{m - 1}(x_i - \bar{x})^2} $$ \item \texttt{std(x)}: computes the sample standard deviation of a given non-empty list or array $x$. From d06dbe3afb936103982fe5879b209671e6fb82b3 Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 17:40:33 +0200 Subject: [PATCH 4/5] fix (ML 00 - ex TinyStatistician): change of percentile definition -> use of linear interpolation identical to default of numpy.percentile --- module05/en.subject.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module05/en.subject.tex b/module05/en.subject.tex index b6deea2c..0ac893b8 100644 --- a/module05/en.subject.tex +++ b/module05/en.subject.tex @@ -543,13 +543,13 @@ \section*{Examples} # Output: 4.6 - TinyStatistician().percentile(a, 15) + TinyStatistician().percentile(a, 28) # Output: - 6.4 + 13.840000 - TinyStatistician().percentile(a, 20) + TinyStatistician().percentile(a, 83) # Output: - 8.2 + 136.119999... TinyStatistician().var(a) # Output: @@ -561,7 +561,7 @@ \section*{Examples} \end{minted} \info{ - numpy uses a different definition of percentile, it does linear interpolation between the two closest list element to the percentile. + numpy has different definitions for \texttt{percentile}, the one we are expecting is the linear interpolation method. Be sure to understand the difference between the population and the sample definition for the statistic metrics. } From 0082c756e8122898a189f5bb116c441a5ed337e7 Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 19:41:17 +0200 Subject: [PATCH 5/5] typo (ML 00 - ex01 TinyStatistician): fixing the variance formula --- module05/en.subject.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module05/en.subject.tex b/module05/en.subject.tex index 0ac893b8..67239027 100644 --- a/module05/en.subject.tex +++ b/module05/en.subject.tex @@ -507,7 +507,7 @@ \section*{Instructions} \newline Given a vector $x$ of dimension m * 1 representing the a sample of a data population, the mathematical formula of its variance is: $$ - \sigma^2 = \frac{\sum_{i = 1}^{m}(x_i - \bar{x})^2}{m - 1} = \frac{\sum_{i = 1}^{m - 1}(x_i - \bar{x})^2} + \sigma^2 = \frac{\sum_{i = 1}^{m}(x_i - \bar{x})^2}{m - 1} = \frac{\sum_{i = 1}^{m - 1}(x_i - \bar{x})^2}{m - 1} $$ \item \texttt{std(x)}: computes the sample standard deviation of a given non-empty list or array $x$. @@ -517,7 +517,7 @@ \section*{Instructions} \newline Given a vector $x$ of dimension m * 1, the mathematical formula of the sample standard deviation is: $$ - \sigma = \sqrt{\frac{\sum_{i = 1}^{m}{(x_i - \bar{x})^2}}{m - 1}} = \sqrt{\frac{\sum_{i = 1}^{m - 1}{(x_i - \bar{x})^2}}{m-1}} + \sigma = \sqrt{\frac{\sum_{i = 1}^{m}{(x_i - \frac{\sum_{i = 1}^{m}{x_i}}{m})^2}}{m - 1}} = \sqrt{\frac{\sum_{i = 1}^{m - 1}{(x_i - \bar{x})^2}}{m-1}} $$ \end{itemize}