Hi Dennis,
I may have misread Glen's answer to my query, which looked to me reasonable, and
concluded that discrete as well as continuous uniform functions can be used to
select an integer value having equal probability. To select an integer value one
has to multiply the continuous U value by an appropriate integer, add 1, and take
the integer part. Please see Glen's response below. Do you think this is a wrong
approach? On the other hand, I agree with you that sampling from a random number
generator is the straight forward procedure to select an integer random value,
which keeps the discrete notion valid. Cheers. Shareef
.
I'm going to start from the assumption that the original poster has
> a source of U(0,1) numbers, and is simply unsure of how to use it
> to randomly choose from a set of discrete choices.
>
> Lets say U is a uniform on (0,1). Then if [.] is the "integer part"
> function ([3.14] = 3, [3] = 3), [U*k]+1 gives discrete uniform integers
> from  1 to k.
>
> Glen


Dennis Roberts wrote:

> perhaps i don't get it but, if you want a discrete variable ... does that
> not eliminate the notion of it being continuous?
>
> a continuous variable is one where ANY value from A to B ... is possible
> and in the realm of being sampled but, not so for a discrete variable
>
> this just does not seem like a problem to me ... if i want to sample 20 or
> 10,000 values from a  DISCRETE random variable where admissible values are
> say ... 10 to 20 ... minitab could do this easily (uses an "integer"
> generating function) like:..........



.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to