POV-Ray : Newsgroups : povray.off-topic : A small statistics question Server Time
11 Oct 2024 09:17:39 EDT (-0400)
  A small statistics question (Message 11 to 20 of 29)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 9 Messages >>>
From: Mueen Nawaz
Subject: Re: A small statistics question
Date: 26 Nov 2007 22:58:02
Message: <474b95ca$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> Anybody have any idea how I can make a program generate random numbers 
>> between 30 and 30,000, but so that "most" of the numbers generated are 
>> actually in the range 100 - 400?
> 
> http://en.wikipedia.org/wiki/Poisson_distribution

	I'd have used a Gaussian - any particular reason to choose a Poisson?

-- 
Isn't it counterproductive to have incandescent bulbs in a fridge?


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

From: Invisible
Subject: Re: A small statistics question
Date: 27 Nov 2007 04:21:10
Message: <474be186$1@news.povray.org>
Mueen Nawaz wrote:
> Warp wrote:
>> Invisible <voi### [at] devnull> wrote:
>>> Anybody have any idea how I can make a program generate random numbers 
>>> between 30 and 30,000, but so that "most" of the numbers generated are 
>>> actually in the range 100 - 400?
>> http://en.wikipedia.org/wiki/Poisson_distribution
> 
> 	I'd have used a Gaussian - any particular reason to choose a Poisson?

100 and 400 are both nearer to 30 than to 30,000?


Post a reply to this message

From: Tim Attwood
Subject: Re: A small statistics question
Date: 27 Nov 2007 05:50:07
Message: <474bf65f$1@news.povray.org>
Depends on how efficient or accurate it needs to be.

A simple but inefficient way is to create a curve
function that represents the desired distribution,
generate two random numbers representing an
X,Y vector on the chart, then reject the points
above the curve, and use the X value of accepted
points as the random value.

An efficient but more complicated method is
to create a bar graph approximation of the
distribution curve, then "stack" the rectangles.
Then you can create an X,Y vector guaranteed
to be inside the stack of rectangles, then figure
the X offset of the rectangle based on Y and
use X + X offset @ Y as your random value.


Post a reply to this message

From: Tom Galvin
Subject: Re: A small statistics question
Date: 28 Nov 2007 10:34:39
Message: <474d8a8f$1@news.povray.org>
Invisible wrote:
> scott wrote:
> 
>> #if( rand(s1) < 0.1 )
>> #local N = rand(s1) * 29970 +  30;
>> #else
>> #local N = rand(s1) *   300 + 100;
>> #end
> 
> Mmm, yeah, I guess that would work. :-)


I saw the question, came to the same answer, and anticipated the same 
response, even it had been in haskell.  Don't you have some flirting you 
should be catching up with?


Post a reply to this message

From: Invisible
Subject: Re: A small statistics question
Date: 28 Nov 2007 10:37:50
Message: <474d8b4e$1@news.povray.org>
Tom Galvin wrote:

> I saw the question, came to the same answer, and anticipated the same 
> response, even it had been in haskell.  Don't you have some flirting you 
> should be catching up with?

That requires a partner. :-P


Post a reply to this message

From: Bill Pragnell
Subject: Re: A small statistics question
Date: 28 Nov 2007 10:49:49
Message: <474d8e1d$1@news.povray.org>
Invisible wrote:
> Tom Galvin wrote:
> 
>> I saw the question, came to the same answer, and anticipated the same 
>> response, even it had been in haskell.  Don't you have some flirting 
>> you should be catching up with?
> 
> That requires a partner. :-P

You could always flirt with yourself. Mind you don't go blind, though.


Post a reply to this message

From: Orchid XP v7
Subject: Re: A small statistics question
Date: 28 Nov 2007 16:57:14
Message: <474de43a$1@news.povray.org>
Bill Pragnell wrote:

> You could always flirt with yourself. Mind you don't go blind, though.

Oh that's cute. :-P


Post a reply to this message

From: M a r c
Subject: Re: A small statistics question
Date: 28 Nov 2007 17:09:25
Message: <474de715@news.povray.org>

474d8e1d$1@news.povray.org...
>
> You could always flirt with yourself. Mind you don't go blind, though.

Let's not forget the kittens
http://en.wikipedia.org/wiki/Image:God-kills-kitten.jpg

Marc


Post a reply to this message

From: Orchid XP v7
Subject: Re: A small statistics question
Date: 28 Nov 2007 17:27:22
Message: <474deb4a$1@news.povray.org>
M_a_r_c wrote:

> Let's not forget the kittens

http://lolcat.com/godkills.html


Post a reply to this message

From: Sabrina Kilian
Subject: Re: A small statistics question
Date: 28 Nov 2007 23:54:02
Message: <474e45ea$1@news.povray.org>
Orchid XP v7 wrote:
> M_a_r_c wrote:
> 
>> Let's not forget the kittens
> 
> http://lolcat.com/godkills.html

Ceiling cat is watching you kill kittens?


Post a reply to this message

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

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