[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generating "independent" random numbers
From: |
tomas |
Subject: |
Re: Generating "independent" random numbers |
Date: |
Tue, 3 Oct 2023 18:04:45 +0200 |
On Tue, Oct 03, 2023 at 03:08:03PM +0000, Zelphir Kaltstahl wrote:
> Hello Guile Users,
>
> today I want to verify some understanding I have about generating random
> numbers using Guile.
[...]
> Some time ago, I wanted to generate uniformly distributed floats though.
Wait a minute: you want uniformly distributed floats (in an interval,
I assume)?
> There seems to be no facility in Guile to do that. So I took a look at
> Wikipedia:
> https://en.wikipedia.org/wiki/Normal_distribution#Computational_methods:
>
> > An easy-to-program approximate approach that relies on the central limit
> theorem is as follows [...]
What you get here is (an approximation to) a *normal* distribution, which
is something totally different (you actually use N (== 12 in your example)
*uniform* distributions to build that)
[...]
> Aha! They need to be "independent" too! Not only uniformly distributed!
> Might be my code would be working wrong, if I do not pay attention to
> statistical traps.
If your random number generator is "good enough", consequent values are
expected (heh) to be (statistically [1]) independent. So I wouldn't bother
too much about it. On the contrary -- perhaps this mode is better tested
than using twelve "parallel" PRNGs as you plan.
Cheers
[1] Yeah, deep philosophical rabbit holes everywhere. I mean it in some
robust, practical way.
--
t
signature.asc
Description: PGP signature