Re: Interesting Simulation Problems....
- To: mathgroup@smc.vnet.net
- Subject: [mg12238] Re: [mg12084] Interesting Simulation Problems....
- From: "Tomas Garza" <tgarza@mail.internet.com.mx>
- Date: Tue, 5 May 1998 03:29:33 -0400
LinLee wrote:
> Problem 2. Two persons agree to arrive at the two clock sometime
between 1 pm
> and 2 pm and to
> stay for 20 minutes. What is the probability that they will be
there
> at the same time?
LinLee:
Another approach to a simulation solution, more in line with
Mathematica: arrivals are independent, uniformly distributed r.v.
between 1 and 2. Choose two arrivals, order them, and see if the
difference between the first and the second arrival is greater than 20
minutes.
sampleúble[Sort[{Random[Real,{1,2}],Random[Real,{1,2}]}],{10000}];
brúmple/.{a_,b_}->a-b+1/3;
Count[br,_?NonNegative]
Good luck,
Tomas Garza
Mexico City