MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Interesting Simulation Problems....




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



  • Prev by Date: Re: COMBINING LISTS
  • Next by Date: Re: How to do 3D plot of vertical planes?
  • Prev by thread: Re: Interesting Simulation Problems....
  • Next by thread: Re: Interesting Simulation Problems....