produce a uniformly distributed random integer in the
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 12 articles for 0.026 sec
Re: produce a uniformly distributed random integer in the range     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: "Pardee, Roy"
Date: Sep 22, 2008 18:06

...EDU Subject: Re: [SAS-L] produce a uniformly distributed random integer in the range (-x) to (x)...; do i = 1 to 10000 ; randy = ceil(61*uniform(0)) - 31; output ; end ; drop ... ; or ... randy = ceil((2*&fuzzdays + 1)*uniform(0)) - (&fuzzdays + 1); -- Mike Zdeb... ; data gnu ; do i = 1 to 10000 ; randy = uniform(0) ; * This doesnt assign enough values...
Show full article (1.69Kb)
Re: produce a uniformly distributed random integer in the range (-x)     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: RolandRB
Date: Sep 23, 2008 10:04

....ORG ("Pardee, Roy") wrote: Hey All, I need to generate a random integer that falls in the range (-x) and (x) and am ... FuzzDays = 30 ; data gnu ;   do i = 1 to 10000 ;     randy = uniform(0) ;     * This doesnt assign enough values of &... so indeed you get about half the counts. Since you are rounding to the nearest integer then you need to extend the range by 0.5 at either ...
Show full article (1.48Kb)
Re: produce a uniformly distributed random integer in the range     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: Kevin Viel
Date: Sep 22, 2008 21:12

On Mon, 22 Sep 2008 08:21:42 -0700, Pardee, Roy <pardee.r@GHC.ORG> wrote: I need to generate a random integer that falls in the range (-x) and (x) and am finding it suprisingly difficult. The below code works well in terms of staying w/in the desired range, but when you look at the freqs, the 2 extreme values only occur at half the ...
Show full article (0.76Kb)
Re: produce a uniformly distributed random integer in the range     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: Carl Denney
Date: Sep 22, 2008 18:32

... type=cite class=cite cite="">Hey All,<br><br> I need to generate a random integer that falls in the range (-x) and (x) and am finding it suprisingly difficult.&nbsp; The below code works well in terms of ...;<br><br> data gnu ;<br> &nbsp; do i = 1 to 10000 ;<br> &nbsp;&nbsp;&nbsp; randy = uniform(0) ;<br> &nbsp;&nbsp;&nbsp; * This doesnt assign enough values of &amp;...
Show full article (1.79Kb)
Re: produce a uniformly distributed random integer in the range     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: "./ ADD NAME=Data _null_,"
Date: Sep 22, 2008 17:53

..., Roy <pardee.r@ghc.org> wrote: Hey All, I need to generate a random integer that falls in the range (-x) and (x) and am finding it suprisingly difficult. The below code works well in terms of staying ... %%let FuzzDays = 30 ; data gnu ; do i = 1 to 10000 ; randy = uniform(0) ; * This doesnt assign enough values of &FuzzDays and -&FuzzDays...
Show full article (1.19Kb)
Re: produce a uniformly distributed random integer in the range     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: Mike Zdeb
Date: Sep 22, 2008 17:46

... randy; run ; or ... randy = ceil((2*&fuzzdays + 1)*uniform(0)) - (&fuzzdays + 1); -- Mike Zdeb U@Albany ... 12144-3456 P/518-402-6479 F/630-604-1475 Hey All, I need to generate a random integer that falls in the range (-x) and (x) and am ...FuzzDays = 30 ; data gnu ; do i = 1 to 10000 ; randy = uniform(0) ; * This doesnt assign enough values of &FuzzDays...
Show full article (1.41Kb)
produce a uniformly distributed random integer in the range (-x)     

Group: comp.softsys.sas · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.sas
Author: "Pardee, Roy"
Date: Sep 22, 2008 17:21

Hey All, I need to generate a random integer that falls in the range (-x) and (x) and am finding it suprisingly difficult. The below code works well in terms of staying w/in ... thanks! -Roy %%let FuzzDays = 30 ; data gnu ; do i = 1 to 10000 ; randy = uniform(0) ; * This doesnt assign enough values of &FuzzDays and -&FuzzDays. ; ...
Show full article (0.90Kb)
Re: How to properly generate a random integer.     

Group: comp.sys.hp48 · Group Profile · Search for produce a uniformly distributed random integer in the in comp.sys.hp48
Author: Nick
Date: Jan 10, 2007 01:50

...> "Random integer" is a fuzzy concept; if you want to select a random integer *uniformly*distributed* in the *range* of 1 to 6, say (to ... happens if RAND returns .999999999999 ? Then .999999999999 5 * IP produces 5 (surprise!), whereas RAND 5 * CEIL 1...is perfectly possible, with care, to employ HP's RAND properly to produce end results without artifacts, although "fancier" RAND ...
Show full article (2.07Kb)
Re: How to properly generate a random integer.     

Group: comp.sys.hp48 · Group Profile · Search for produce a uniformly distributed random integer in the in comp.sys.hp48
Author: hgabert
Date: Jan 10, 2007 00:38

...> "Random integer" is a fuzzy concept; if you want to select a random integer *uniformly*distributed* in the *range* of 1 to 6, say (to ... happens if RAND returns .999999999999 ? Then .999999999999 5 * IP produces 5 (surprise!), whereas RAND 5 * CEIL 1...is perfectly possible, with care, to employ HP's RAND properly to produce end results without artifacts, although "fancier" RAND ...
Show full article (2.43Kb)
Re: randint problem     

Group: comp.softsys.matlab · Group Profile · Search for produce a uniformly distributed random integer in the in comp.softsys.matlab
Author: Blake Morrow
Date: Sep 9, 2008 15:35

... 2. What does randint do when you call it as just randint, with no arguments. Even if this were to work, why should multiplying the result by 300 produce a random integer in the range [0,300]? READ THE HELP FOR THE ... 7.5. Help file: RANDINT Generate matrix of uniformly distributed random integers. OUT = RANDINT generates a "0" or "1" ...
Show full article (4.06Kb) · Show article thread
1 · 2 · next