POV-Ray : Newsgroups : povray.advanced-users : Random variation Server Time
29 Jul 2024 12:15:32 EDT (-0400)
  Random variation (Message 11 to 20 of 25)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>
From: Shay
Subject: Re: Random variation
Date: 26 Sep 2002 16:01:09
Message: <3d936785$1@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote in message
news:3D93663B.471DD47E@gmx.de...
>
> Yes, this means the chance that two consecutive random numbers have
> exactly the same value is infinitely small.
>

...and equal to any other sequence. I think that we are all agreeing with
each other.

 -Shay


Post a reply to this message

From:
Subject: Re: Random variation
Date: 26 Sep 2002 16:05:04
Message: <3d93677c.99183057@news.povray.org>
On Thu, 26 Sep 2002 14:56:13 -0400, Christopher James Huff
<chr### [at] maccom> wrote:
>Say you have 2 (identical) dice. Is the 1:1 combination less likely than 
>the 1:4 combination?

Yes. Given that the two dice are identical you can't tell the
difference between 1:4 and 4:1, thus 4:1 is twice as likely to occur
as 1:1. If we change the premise so we only have one dice that we roll
twice 1:4 is as likely to occur as 1:1, now we've given value to the
order (1:4 <> 4:1). If you really want fun with permutations, try to
calculate the cumulative odds on a slot machine. I once attempted that
for a simulated slot machine I programmed, I ended up fiddling the
values until emparative testing showed the desired return rate (or
close enough) instead.

/Erkki


Post a reply to this message

From: Christopher James Huff
Subject: Re: Random variation
Date: 26 Sep 2002 16:11:48
Message: <chrishuff-FF433B.16091526092002@netplex.aussie.org>
In article <3D93604D.4292E793@gmx.de>,
 Christoph Hormann <chr### [at] gmxde> wrote:

> All right, but mathematics don't care about double precision

What branch of mathematics are you thinking of? Computer science is 
largely mathematics, and definitely does care. Finite binary 
representations of numeric values may not matter in the abstract 
concepts of mathematics, but those concepts do deal with the same 
situations.


> so since there is an infinite number of real numbers between 0 and 
> 1...

A specific value still has the same chance of coming up. It doesn't 
matter if it has already come up the previous time, or the previous 10 
times. Um...I really don't know how to express this, I haven't taken any 
classes in it or done much research on my own. The probability seems to 
be 0 but is obviously not 0, and I thought things like the term 
"infinitesimal" weren't used any more. How about: as the size of the set 
(n) increases towards infinity, the probability of a specific value 
being picked (1/n) decreases towards 0, with all values having an equal 
possibility of being picked.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Random variation
Date: 26 Sep 2002 16:16:11
Message: <chrishuff-B5D58B.16133826092002@netplex.aussie.org>
In article <3d93677c.99183057@news.povray.org>,
 Erk### [at] povrayorg (Erkki S?ndergaard) wrote:

> Yes. Given that the two dice are identical you can't tell the
> difference between 1:4 and 4:1, thus 4:1 is twice as likely to occur
> as 1:1. If we change the premise so we only have one dice that we roll
> twice 1:4 is as likely to occur as 1:1, now we've given value to the
> order (1:4 <> 4:1). If you really want fun with permutations, try to
> calculate the cumulative odds on a slot machine. I once attempted that
> for a simulated slot machine I programmed, I ended up fiddling the
> values until emparative testing showed the desired return rate (or
> close enough) instead.

Gah, alright, I misstated the problem. You know what I meant... ;-)

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Random variation
Date: 26 Sep 2002 17:09:04
Message: <3D937770.2863EBC7@gmx.de>
Christopher James Huff wrote:
> 
> > All right, but mathematics don't care about double precision
> 
> What branch of mathematics are you thinking of? Computer science is
> largely mathematics, and definitely does care. [...]

I'm talking about those parts of mathematics that consider there are an
infinite number of real numbers between 0 and 1.

I'm not sure about the precise english terms, but math distinguishes
between natural numbers (integers: 1, 2, 3, ...), rational numbers
(numbers that can be represented as a fraction of two natual numbers) and
real numbers (rational numbers and all other numbers like sqrt(2), pi,
etc.).  The latter two categories are those where two consecutive random
numbers from a given range won't be identical (assuming there is a
mathematical definition of random numbers in that category, which i
doubt).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christopher James Huff
Subject: Re: Random variation
Date: 26 Sep 2002 17:43:09
Message: <chrishuff-968AEA.17401826092002@netplex.aussie.org>
In article <3D937770.2863EBC7@gmx.de>,
 Christoph Hormann <chr### [at] gmxde> wrote:

> I'm not sure about the precise english terms, but math distinguishes
> between natural numbers (integers: 1, 2, 3, ...), rational numbers
> (numbers that can be represented as a fraction of two natual numbers) and
> real numbers (rational numbers and all other numbers like sqrt(2), pi,
> etc.).  The latter two categories are those where two consecutive random
> numbers from a given range won't be identical

If you can consider any two real numbers to be equal, it is possible for 
two consecutive random real numbers to be equal (if you could find a 
source of random reals...even analog circuitry would have a discrete 
number of steps). Rationals can even be represented with a computer, 
though you are practically limited by processing time and memory.

It *is* unlikely to happen in a finite range, and less likely the 
smaller the range. In an infinite random stream of numbers, *every* 
possible combination will occur, and the pattern of two consecutive 
equal real numbers is no less likely than any other pattern of two real 
numbers. 10 consecutive numbers being equal is no less likely than any 
other specific sequence of 10 numbers.

There is definitely no reason for it to be impossible...if you forbade 
these "runs", you wouldn't have a truely random sequence any more.


> (assuming there is a mathematical definition of random numbers in 
> that category, which i doubt).

Why not?

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Mark Wagner
Subject: Re: Random variation
Date: 26 Sep 2002 22:27:06
Message: <pan.2002.09.27.02.26.13.955301.210@gte.net>
On Thu, 26 Sep 2002 08:31:46 -0400, Andrew Coppin quoth:

> I was doing a render earlier today, and I got to wondering about
> something... Suppose you write something like
> 
> #declare A = seed(...);
> #declare J = rand(A);
> #declare K = rand(A);
> 
> POV-Ray's rand() function returns random numbers in the (closed?)
> invertal 0..1. But what is the minimum difference between J and K?
> Presumably if you're really fluky they might just happen to have the
> exact same value (improbable but not impossible).

Because of the way that POV-Ray's random number generator works, it will
never produce the same number twice in a row (if it did, it would then
proceed to produce that number every single time).

-- 
Mark


Post a reply to this message

From: Christopher James Huff
Subject: Re: Random variation
Date: 26 Sep 2002 22:56:54
Message: <chrishuff-B5E4B5.22540426092002@netplex.aussie.org>
In article <pan### [at] gtenet>,
 Mark Wagner <mar### [at] gtenet> wrote:

> Because of the way that POV-Ray's random number generator works, it will
> never produce the same number twice in a row (if it did, it would then
> proceed to produce that number every single time).

It will never produce the same integer value. I'm not sure rounding 
error won't make some of those integer values equal the same double 
value...I doubt it, but I'm not certain. It isn't something I'd worry 
too much about.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Peter Popov
Subject: Re: Random variation
Date: 27 Sep 2002 02:24:37
Message: <5pt7pu8murepmdt0q9bs4fjrl3l6etdchq@4ax.com>
On Thu, 26 Sep 2002 20:08:30 GMT, Erk### [at] povrayorg (Erkki


>Yes. Given that the two dice are identical you can't tell the
>difference between 1:4 and 4:1, thus 4:1 is twice as likely to occur
>as 1:1.

I still remember that particular lesson in high school. My math
teacher in high-school, a very good backgammon player BTW, had the
same argument. I then asked whether that meant that playing with a
pair of white dice gave you a better chance of throwing double-6 than
if playing with a black and a white on. We had a good laugh :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Warp
Subject: Re: Random variation
Date: 27 Sep 2002 06:36:33
Message: <3d9434b1@news.povray.org>
Mark Wagner <mar### [at] gtenet> wrote:
> Because of the way that POV-Ray's random number generator works, it will
> never produce the same number twice in a row (if it did, it would then
> proceed to produce that number every single time).

  Then it's a rather poor random number generator, I must say.
  In a good random number generator, any combination of two numbers (including
the same number twice) should be about equally probable.
  Of course this is a very difficult issue.

  I wonder if an approach like the drand48() function would be better.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.