Do you "sample" a random number generator? If not, what's the correct word?

892 Views Asked by At

This is basically an English language question, but since it pertains to mathematics and programming quite directly, I'll post it here.

Let $D$ denote a random number generator. More precisely, assume that $D$ is a probability measure on the real line. Maybe it's the standard normal distribution or something. Imagine we've implemented $D$ on a computer, and we decide to "sample" it 10 times and put the values thereby obtained the variables $x_0,\ldots,x_9$.

Question. What's the correct word for what I'm refer to as "sampling"?

5

There are 5 best solutions below

3
On

I'd say call, as in a function call or method call. Call the random number generator.

Regarding your comments under the question, it does feel unnatural to say run/call the standard normal distribution, but it isn't unnatural to say call rnorm() when discussing R code, for example.

3
On

It is arguably impossible to generate values randomly from a given probability distribution. Using a computer, we can at best generate a stream of values that "looks like" values from such a distribution. But the stream is completely predictable from the standpoint of an observer who knows the program, seeding values, and starting point. A better case for randomness can be made for chaotic generators that depend ultimately on quantum effects. But here we are getting into deep philosophical waters—including the question of whether we can rule out entanglement with any deterministic system.

The point of the above is that the values are necessarily dependent on the type of device that generates them. Thus the language used to describe how these values are obtained should reflect that of those who work with such devices rather than the (mathematical) terminology of probability theory. In any case, it would seem correct to describe the values as, say, "generated by a pseudo-random/ quantum-chaotic/etc. N($0,1$)-simulator". Albeit, this is rather a mouthful, but it could be shortened to "generated".

0
On

I think the answer depends on context, but I tend to say "draw" from the generator when discussing its use in an algorithm, as in "we draw 10 samples to start the process." I think "sample" would also be fine, especially if the context is more clearly statistical.

If discussing it in a more computer science or software development context - say with a staff programmer who is not especially mathematically oriented - then I'd refer to it as a "function call" or a "method call" depending on the programming language. To them, this is just another of the many functions (in the software sense) in the program no different from any other.

0
On

You obtain a random number from a random number generator, which generates them.

At least Wikipedia uses this terminology, see e.g. the picture on the right of the linked page where it says:

When a cubical die is rolled, a random number between 1 and 6 is obtained.

0
On

If you are using the numbers then I would it consume or call.

A set of 10 random numbers I would call a set of 10 random numbers.

If I was using the numbers to evaluate the random number generator then in that case I would call it a sample set.