Thread View: sci.math.stat
1 messages
1 total messages
Started by mglacy
Fri, 16 Oct 1992 19:59
Another RNG question
Author: mglacy
Date: Fri, 16 Oct 1992 19:59
Date: Fri, 16 Oct 1992 19:59
16 lines
1275 bytes
1275 bytes
I've been trying out a new RNG code. It appears to yield a very nice random u.r.v (0,1). (At least it looks fine under k-s tests, which is sufficient for my purposes.) However, when I use it to generate uniformly distributed random *integers*, it produces lousy results. I've just been multiplying each random real by some N, and then truncating the result to an integer. To make the range be 1..N, I've then been adding 1 to the truncated result. Any suggestions on why might be going wrong here? Is this to be expected? Thanks. =-=-=-=-=-=-=-=-=-==-=-=-= Mike Lacy, Sociology Dept. CSU and I have a deal: We don't take Colo. State Univ. responsibility for one another's opinions. Fort Collins CO 80523 voice (303) 491-6721
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads