Sep-03-2022, 06:45 AM
(This post was last modified: Sep-03-2022, 06:53 AM by Gribouillis.)
(Sep-02-2022, 10:27 PM)Skaperen Wrote: if i use 240 for N then my pseudo bell curve would have bounds that are 240 apart making these random values just rightThat's because you don't really understand the central limit theorem. When you sum N random numbers equidistributed in [0, 1], the mean value is N/2 which is 240/2 = 120 sec = 2 minutes in your case, but the standard deviation is sqrt(N/12) which is sqrt(240/12) = 4.5 seconds in your case. It means that you'll find a random waiting time of 22 minutes with a standard deviation of 4.5 seconds, probably not what you want.
With my code, you can choose the standard deviation. Of course, the law is not exactly a Bell curve, it is a Bell curve truncated to the intervall [20, 24], but as @ndc85430 said above, if the standard deviation is not too large, it amounts to approximately the same thing.