NormalToyMC¶
Description¶
Generates a random sample distributed according to multivariate normal distribution without correlations.
Uses boost::mt19937 random generator.
The sample becomes frozen upon generation. One has to manually taint the transformation
for the next sample by calling nextSample method.
Inputs¶
- Average model vector \(\mu_1\). 
- First model uncertainties vector \(\sigma_1\). 
- Average model vector \(\mu_2\). 
- Second model uncertainties vector \(\sigma_2\). 
- etc. 
- etc. 
Inputs are added via add(theory, sigma) method.
Outputs¶
- 'toymc'— output vector \(x\) of size of concatination of \(\mu_i\).
Implementation¶
For the random variable vector \(x\) of size \(N\), distributed around \(\mu\) with uncertainties \(\sigma\) the p.d.f. is:
One can define the vector \(z\):
Since the transition Jacobian \(|dx/dz|=|L|=\prod\limits_i \sigma_i\) each \(z_i\) is distributed normally with \(\sigma=1\) with central value of \(0\).
The algorithm generates normal vector \(z\) and transforms it to \(x_i=\sigma_i z_i + \mu_i\).
By \(\mu\) we mean the concatenation of vectors \(\mu_i\).