Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Topic: Monte Carlo simulation with inequality constraints
Replies: 11   Last Post: Mar 23, 2012 8:53 AM

 Messages: [ Previous | Next ]
 Ray Koopman Posts: 3,347 Registered: 12/7/04
Re: Monte Carlo simulation with inequality constraints
Posted: Mar 15, 2012 4:11 PM

On Mar 15, 3:21 am, deltaquattro <deltaquat...@gmail.com> wrote:
> Hi, all,
>
> I've been given a computer codes with some input variables X1,...Xn
> and some outputs Y1,...Ym. I want to use a Monte Carlo code to
> compute the distributions of the Ys, given some distributions for
> the Xs. The Xs are geometrical parameters of an industrial design,
> and as a first approximation they are considered independent.
> Unfortunately the code doesn't run when X1<X2 or X3<X4, so I need
> to impose the two constraints X1>=X2 and X3>=X4.
> How can I do it? I'd prefer a solution which is valid for general
> distributions, but I can also accept one which works when the Xs
> are normally distributed.
>
> Some ideas which sprung to my mind:
> 1. My Monte Carlo code allows to define a linear correlation matrix
> for the input variables: I don't see how this helps, but maybe you
> do :)
> 2. I let the Monte Carlo code to generate freely the sample runs,
> and whenever a run has X1<X2 or X3<X4, I discard it. However, I'm
> worried that this "rejection process" may distort the distributions
> of the Xs. Also, I guess I'll need to perform four times as many
> Monte Carlo runs as usual, to have the same level of statistical
> convergence.
> 3. I change my Monte Carlo variables: instead than X1 and X3,
> I use Z1 = |X1-X2| and Z2=|X3-X4|. This way, X1 = X2 + Z1 >= X2,
> and X3 = X4 + Z2 >= X4. However, while I was able to make some
> reasonable assumptions on the distributions of the original
> variables, now I have no idea which distributions I should use
> for Z1 and Z2...Thanks,
>
> Best Regards,
>
> deltaquattro
>
> ps apologies for the double posts, but I'm not sure which ng is
> more suitable for this thread, and I'm not able to create a

I'm sending this reply to both groups. Can you reply to crossposts?

On Mar 15, 9:30 am, deltaquattro <deltaquat...@gmail.com> wrote:
> Il giorno giovedì 15 marzo 2012 16:22:42 UTC+1,
> Dave Dodson ha scritto:
>

>> Let R1, R2, R3, and R4 be four random numbers. Set X1 = max(R1,R2),
>> X2 = min(R1,R2), X3 = max(R3,R4), and X4 = min(R3,R4).
>>
>> Dave

>
> Cool, thanks! This sounds a bit like my solution 3, but using min
> and max instead than abs and + . In your case, which are the
> distribution of X1 and X2, for example? I guess they're different
> from the distributions of R1 and R2. Also, do you have any comment
> about solution 2, i.e., [see above]
>
> Do you know if in this case, the distributions of X1, X2, X3, X4
> would be the same as without "rejection", or if they are different?
> Thanks,
>
> Best Regards
>
> deltaquattro

Both rejecting and swapping out-of-order pairs will change the
marginal distributions.

How much do you know about the desired final distributions?

Date Subject Author
3/15/12 deltaquattro@gmail.com
3/15/12 Dave Dodson
3/15/12 deltaquattro@gmail.com
3/15/12 Ray Koopman
3/16/12 deltaquattro@gmail.com
3/16/12 Ray Koopman
3/19/12 deltaquattro@gmail.com
3/22/12 Ray Koopman
3/22/12 deltaquattro@gmail.com
3/22/12 Ray Koopman
3/23/12 deltaquattro@gmail.com
3/16/12 AMX