How it works...
We are approximating the integrals inside each group via simulation (we draw multiple instances of Gaussian random numbers and we average them). This is done for each group and the logarithms of those values are then summed. Ideally, we would like to use as many simulations as possible, but the more we use, the slower the algorithm is. As it can be seen at the end, we get almost the same values as we should: 1,1, and 0.03; the reasons these results are not the same is, firstly, because we are using a small number of simulations per integral, and secondly, because there is always some sample variability.
A very important point, worth clarifying, is that the functional relationship that we choose for our models needs to be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access