Re: number generator
- From: Paul Rubin <http://phr.cx@xxxxxxxxxxxxxx>
- Date: 10 Mar 2007 16:02:56 -0800
Steven D'Aprano <steve@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
By your method, what is the probability of the first number being
higher than 30? What is the probability of the fifth number being
higher than 30? If these probabilities are unequal, can we really say
the sequences are random?
Of course we can! "Uniform probability distribution" is a special case of
random. Most random quantities are far from uniform. The Python random
module includes a couple of non-uniform distributions, including
exponential distribution (random.expovariate) and the famous bell curve
distribution (random.normalvariate).
Ehh. Say we call some generator repeatedly and get back the sequence
(3, 3, 3, 3, 3, ...). Would we say this is a random sequence using a
distribution that puts 100% of the probability density at 3? Or would
we just say it isn't random?
For something like this partition problem, describing some generator
as making a random partition should contain some reasonable
description of the distribution. For example, we could say the
generator selects one of the P(n) possible partitions with equal
probability. For another, we could say it uses the "fencepost" method
and the distribution is whatever results from that. Question then is
whether those two distributions are the same.
.
- Follow-Ups:
- Re: number generator
- From: Steven D'Aprano
- Re: number generator
- References:
- number generator
- From: cesco
- Re: number generator
- From: Steven D'Aprano
- Re: number generator
- From: Paul Rubin
- Re: number generator
- From: Steven D'Aprano
- number generator
- Prev by Date: Re: number generator
- Next by Date: Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again
- Previous by thread: Re: number generator
- Next by thread: Re: number generator
- Index(es):
Relevant Pages
|