Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

 Messages: [ Previous | Next ]
 quasi Posts: 12,067 Registered: 7/15/05
Re: Random numbers
Posted: Dec 22, 2007 1:16 PM

On Fri, 21 Dec 2007 10:57:00 -0800 (PST), simple.popeye@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

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