[statistics] shortened exercise01

This commit is contained in:
Jan Benda 2019-12-02 12:10:40 +01:00
parent fe05c2be8e
commit 2eaddbf90b

View File

@ -242,53 +242,6 @@ that are symmetric around the mean?
\end{solution} \end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question \qt{Central limit theorem}
According to the central limit theorem the sum of independent and
identically distributed (i.i.d.) random variables converges towards a
normal distribution, although the distribution of the randmon
variables might not be normally distributed.
With the following questions we want to illustrate the central limit theorem.
\begin{parts}
\part Before you continue reading, try to figure out yourself what
the central limit theorem means and what you would need to do for
illustrating this theorem.
\part Draw 10000 random numbers that are uniformly distributed between 0 and 1
(\code{rand} function).
\part Plot their probability density (normalized histogram).
\part Draw another set of 10000 uniformly distributed random numbers
and add them to the first set of numbers.
\part Plot the probability density of the summed up random numbers.
\part Repeat steps (d) and (e) many times.
\part Compare in a plot the probability density of the summed up
numbers with the normal distribution
\[ p_g(x) =
\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}\]
with mean $\mu$ and standard deviation $\sigma$ of the summed up random numbers.
\part How do the mean and the standard deviation change with the
number of summed up data sets?
\part \extra Check the central limit theorem in the same way using
exponentially distributed random numbers (\code{rande} function).
\end{parts}
\begin{solution}
\lstinputlisting{centrallimit.m}
\includegraphics[width=0.5\textwidth]{centrallimit-hist01}
\includegraphics[width=0.5\textwidth]{centrallimit-hist02}
\includegraphics[width=0.5\textwidth]{centrallimit-hist03}
\includegraphics[width=0.5\textwidth]{centrallimit-hist05}
\includegraphics[width=0.5\textwidth]{centrallimit-samples}
\end{solution}
\end{questions} \end{questions}
\end{document} \end{document}