The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: Random numbers
Replies: 64   Last Post: Dec 24, 2007 1:04 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
simple.popeye@gmail.com

Posts: 38
Registered: 12/18/07
Re: Random numbers
Posted: Dec 22, 2007 2:17 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Dec 23, 12:00 am, quasi <qu...@null.set> wrote:
> On Sat, 22 Dec 2007 13:51:57 -0500, quasi <qu...@null.set> wrote:
> >On Sat, 22 Dec 2007 10:43:27 -0800 (PST), vr <simple.pop...@gmail.com>
> >wrote:

>
> >>On Dec 22, 11:35 pm, quasi <qu...@null.set> wrote:
> >>> On Sat, 22 Dec 2007 10:32:37 -0800 (PST), vr <simple.pop...@gmail.com>
> >>> wrote:

>
> >>> >On Dec 22, 11:16 pm, quasi <qu...@null.set> wrote:
> >>> >> On Fri, 21 Dec 2007 10:57:00 -0800 (PST), simple.pop...@gmail.com
> >>> >> wrote:

>
> >>> >> >On Dec 21, 11:37 pm, bill <b92...@yahoo.com> wrote:
> >>> >> >> On Dec 21, 3:16 am, John <iamach...@gmail.com> wrote:
>
> >>> >> >> > Given a function that returns a random number between 1-5, write one
> >>> >> >> > that returns a random number between 1-7 for the case when it should
> >>> >> >> > be integer and for the case it can be real.

>
> >>> >> >> Let S be the function that generates a RN between 1 and 5.  Then
>
> >>> >> >> T =  S_1 + S_2 + ... + S_7
>
> >>> >> >> For the reals , RN_7 = T/7
>
> >>> >> >May be this should fix it:
>
> >>> >> >For the reals , RN_7 = 1 + (T-7)*3/14
>
> >>> >> Yes, that fixes the range.
>
> >>> >> But it's still biased (that is, not a unform distribution).
>
> >>> >> quasi- Hide quoted text -
>
> >>> >> - Show quoted text -
>
> >>> >Hmm. Let me simplify it:
>
> >>> >RN_7 = T*3/14 - 0.5
>
> >>> >If you look at T*3/14, it just scales the sum of random numbers
> >>> >uniformly using a constant multiplier. Did I miss to notice any non-
> >>> >uniformity here?

>
> >>> Yes, T is not uniformly distributed in its range.
>
> >>Ok. But if S_n is guaranted to be uniformly distributed in the range 1
> >>to 5, then doesn't it mean the sum of 7 such numbers will also get
> >>distributed over 7 to 35? I'm just curious. Thanks.

>
> >Yes, but not uniformly.
>
> >What's the chance of getting exactly 35?
>
> >If it was a uniform distribution it would be 1/29, right?
>
> Of course, that's assuming S is a uniformly distributed integer
> variable on {1,2,3,4,5}.
>
> If instead, S is a uniformly distributed continuous variable on (1,5)
> then we can ask -- what's that chance of getting a result more than
> 34? It should be at least 1/28, right? But it's easily seen to be a
> lot less than that (the probability is bounded above by  1/2^(14)).


I understand the problem with the intger sum. But for the sum of
reals, If there is a non-uniformity I think it is due to finite number
of double precision numbers available in the given interval. But then
your solution will also be affected by this problem.

Thinking of the chance of hitting 35, I do not see the reason why it
will be less than the chances of hitting any other number in [7,35],
asssuming we are talking of continuous reals, instead of doubles.
Ofcourse, unless 5 has a different chance for htting compared to other
numbers in [1,5].

-vr


Date Subject Author
12/21/07
Read Random numbers
Champ
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Marshall
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Phil Carmody
12/21/07
Read Re: Random numbers
Marshall
12/21/07
Read Re: Random numbers
briggs@encompasserve.org
12/21/07
Read Re: Random numbers
William Elliot
12/21/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
William Elliot
12/21/07
Read Re: Random numbers
Pubkeybreaker
12/21/07
Read Re: Random numbers
b92057@yahoo.com
12/22/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
simple.popeye@gmail.com
12/21/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
Gib Bogle
12/22/07
Read Re: Random numbers
quasi
12/21/07
Read Re: Random numbers
Marshall
12/22/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
quasi
12/22/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
quasi
12/23/07
Read Re: Random numbers
simple.popeye@gmail.com
12/23/07
Read Re: Random numbers
simple.popeye@gmail.com
12/23/07
Read Re: Random numbers
simple.popeye@gmail.com
12/23/07
Read Re: Random numbers
simple.popeye@gmail.com
12/23/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
adder
12/22/07
Read Re: Random numbers
simple.popeye@gmail.com
12/22/07
Read Re: Random numbers
Herman Rubin
12/22/07
Read Re: Random numbers
adder
12/22/07
Read Re: Random numbers
b92057@yahoo.com
12/22/07
Read Re: Random numbers
quasi
12/23/07
Read Re: Random numbers
b92057@yahoo.com
12/23/07
Read Re: Random numbers
quasi
12/23/07
Read Re: Random numbers
b92057@yahoo.com
12/24/07
Read Re: Random numbers
quasi
12/24/07
Read Re: Random numbers
quasi
12/24/07
Read Re: Random numbers
adder
12/24/07
Read Re: Random numbers
quasi
12/24/07
Read Re: Random numbers
adder
12/24/07
Read Re: Random numbers
b92057@yahoo.com

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.