I am trying to use a multidimensional Gaussian to sample material compositions in their probability distributions.
Let's assume I have a material composed of aluminum, carbon and hydrogen. The average composition with associated std deviation is:
- Alu: average 44 %, std dev 19.6 %
- Carb: average 4.5 %, std dev 13 %
- Hydr: average 51.5 %, std dev 24.8 %
I construct a vector mu =[44, 4.5, 51.5] and a covariance matrix (I have some measurement to reconstruct the covariances)
sigma = [ 384.2 -199.2 -216]
[-199.2 169 -68]
[ -216 -68 615.04]
I am performing a sampling with n=2000 with computer script. When I compute the mean and std dev of the 2000 samples, I found back again the correct mean and std dev. However, one constraint is that the sum of alu, carbon and hydrogen is 100 %. So, I renormalize for the sum to be 100 % but this has the effect to change my std deviation.
I illustrate my pb with an example, but my question is more the following:
How can I sample in a multidimensional gaussian, knowing mu and sigma, but adding a constraint on the sum of my output vector?
Many thanks for your help