readme: add exercises 2,3

This commit is contained in:
Michele Guerini Rocco 2020-04-27 21:51:34 +00:00
parent 072cc297ad
commit ba55f1b57b

View File

@ -3,9 +3,9 @@
## Description
This repository contains source code of two documents
This repository contains the source code of two documents
- `lectures`: an summary of the lectures of the course
- `lectures`: a summary of the lectures of the course
- `notes`: an explanation of the solutions of the exercises
@ -69,8 +69,47 @@ different samples by changing the seed via the environment variable
`ex-1/bin/main` generate random numbers following the Landau distribution and
run a series of test to check if they really belong to such a distribution.
The size of the sample can be controlled with the argument `-n N`.
The program outputs the result of a Kolmogorov-Smirnov test and t-tests
comparing the sample mode, FWHM and median, in this order.
`ex-1/bin.pdf` prints a list of x-y points of the Landau PDF to the `stdout`.
The output can be redirected to `ex-1/pdf-plot.py` to generate a plot.
### Exercise 2
Every program in `ex-2` computes the best available approximation (with a given
method) to the Euler-Mascheroni γ constant and prints[1]:
1. the leading decimal digits of the approximate value found
2. the exact decimal digits of γ
3. the absolute difference between the 1. and 2.
[1]: Some program may also print additional debugging information.
`ex-2/bin/fancy`, `ex-2/bin/fancier` can compute γ to a variable precision and
take therefore the required number of decimal places as their only argument.
The exact γ digits (used in comparison) are limited to 50 and 500 places,
respectively.
### Exercise 3
`ex-3/bin/main` generates a sample of particle decay events and attempts to
recover the distribution parameters via both a MLE and a χ² method. In both
cases the best fit and the parameter covariance matrix are printed.
The program then performs a t-test to assert the compatibility of the data with
two hypothesis and print the results in a table.
To plot a 2D histogram of the generated sample do
$ ex-3/bin/main -i | ex-3/plot.py
In addition the program accepts a few more parameters to control the histogram
and number of events, run it with `-h` to see their usage.
Note: the histogram parameters affect the computation of the χ² and the
relative parameter estimation.