Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

233 ml00 ex01 correction wrong examples #234

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions module05/en.subject.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}{m - 1}
$$

\item \texttt{std(x)}: computes the sample standard deviation of a given non-empty list or array $x$.
Expand All @@ -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 - \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}

Expand All @@ -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:
Expand All @@ -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.
}

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.0.6
v4.0.7