Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
random methods
#8
(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 right
That'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.
ndc85430 likes this post
Reply


Messages In This Thread
random methods - by Skaperen - Sep-02-2022, 12:23 AM
RE: random methods - by ndc85430 - Sep-02-2022, 05:49 AM
RE: random methods - by Gribouillis - Sep-02-2022, 06:28 AM
RE: random methods - by Skaperen - Sep-02-2022, 05:32 PM
RE: random methods - by Skaperen - Sep-02-2022, 05:39 PM
RE: random methods - by Gribouillis - Sep-02-2022, 07:38 PM
RE: random methods - by Skaperen - Sep-02-2022, 10:27 PM
RE: random methods - by Gribouillis - Sep-03-2022, 06:45 AM
RE: random methods - by Skaperen - Sep-04-2022, 12:23 AM
RE: random methods - by Skaperen - Sep-04-2022, 12:29 AM
RE: random methods - by Gribouillis - Sep-04-2022, 07:48 AM
RE: random methods - by Skaperen - Sep-04-2022, 05:15 PM
RE: random methods - by Gribouillis - Sep-04-2022, 05:45 PM
RE: random methods - by Skaperen - Sep-26-2022, 05:42 AM
RE: random methods - by Gribouillis - Sep-26-2022, 12:08 PM
RE: random methods - by Skaperen - Sep-26-2022, 06:18 PM
RE: random methods - by Skaperen - Sep-28-2022, 10:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  help on random methods jip31 2 2,048 Apr-29-2021, 12:15 PM
Last Post: jip31

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020