From: Jean-Julien Fleck Date: 2010-08-17T21:46:24+09:00 Subject: Re: can i do this in ruby? a simulation process 2010/8/17 Andrew Wagner : > Hmm, I may or may not disagree with you on what the output should be. I > can't speak for his assignment, It was just to get him the idea. > Anyway, I did this, for fun, and consistently got an average of around 833 > seconds on average for 100000 trials. Anyone else give this a shot? I'm > curious to see whether different implementations give different results. The > standard deviation seems to be pretty high. I also did, twice on 100000 trials: First: In mean, it took 808.3 seconds to go there. Second: In mean, it took 809.3 seconds to go there. It's quite consistent with the little calculation Brian explained. I would expect the mean result to always be above the 800.7 seconds Brian found as there is very little chance that the sum of the passengers arriving in town be exactly 500 (it ranges from 500 to 539 due to the buses) Cheers, -- JJ Fleck PCSI1 Lycée Kléber