Hi Glen,
Thank you for your advice. In fact I new that I should use the uniform
distribution to select the random value. But for some reason or other, my
brain did not figure out on that day that whether I should use a discrete or a
continuous random number function to select the integer values. It looks like
I could use either one. Cheers. Siddeek



Glen wrote:

> > On Thu, 26 Sep 2002, Shareef Siddeek wrote:
> >
> > > Hi Statisticians,
> > >
> > > I have a simple question. I have the following set of discrete values,
> > > each one of which has the same probability of selection (i.e.,
> > > probability distribution is uniform). How do I proceed to select a
> > > discrete value randomly using the uniform distribution?
> > >
> > > 1, 2, 3, 4, 5, 6, 7, 8, 9
>
> 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
> .
> .
> =================================================================
> Instructions for joining and leaving this list, remarks about the
> problem of INAPPROPRIATE MESSAGES, and archives are available at:
> .                  http://jse.stat.ncsu.edu/                    .
> =================================================================

.
.
=================================================================
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