# How to do Monte Carlo with conditional input values?

Please apologise my likely ignorance of the correct terminology and notation. Any edits and suggestions to improve the question are very much appreciated.

I want to perform a Monte Carlo simulation with a simple computational model. That means I want to random sample the model's input variables and later analyse the sensitivity of the inputs for the results. Let's say the model uses the variables $$a,b,c,$$ and $$d$$ as inputs. However, the model only accepts a cumulated input of 1.0, i.e. $$a+b+c+d=1.0$$.

The input variables are random sampled from a uniform distribution with individual ranges $$\mathcal{U}(y,z)$$ for each.

My first (innocent) thought was to simply random sample, sum the variables and divide each by their sum to normalise them to 1.0. However, this will effectively change the bounds of each variable $$y,z$$ and also distort the uniform distribution.

Now, I am at a loss how I should correctly approach this issue. I feel like I am not the first person that wants to run a Monte Carlo model using conditional inputs, but I could not find any useful pointers in the literature so far. Can anybody help, please?

• Would you mind telling us what your notation "$\overset!=$" means?
– whuber
Oct 11 '18 at 16:52
• @whuber I was hoping this would be understood as "must be equal to" here... math.stackexchange.com/a/926404/248551 Oct 11 '18 at 16:54
• It is amusing that your link goes to a person who identifies this as a personal (idiosyncratic) notation. Even with your explanation in front of me, I am unable to see how your notation actually expresses what you said in English: maybe you meant "$1$" instead of "$b$"? In that case, there seems to be no difference at all between the usual meaning of "$=$" and your intended meaning. Otherwise, could you explain further?
– whuber
Oct 11 '18 at 16:56
• Okay, now that's cleared up, let's see what's going on. You seem to be requiring inconsistent inputs: each marginal has to be uniform, but you need the sum of all four to be constant. Something has to give. What will it be? Which condition(s) can you relax and what can you replace them with?
– whuber
Oct 11 '18 at 18:04
• Right. This implies you need to specify something about the random distribution of the composition. You can find related questions at stats.stackexchange.com/questions/14059 and possibly stats.stackexchange.com/questions/48086.
– whuber
Oct 11 '18 at 19:00