8
$\begingroup$

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"?

$\endgroup$
9
  • 1
    $\begingroup$ As you implemented D on a computer, I would "run" it, just like a program, to generate the desired output. $\endgroup$
    – Dirk
    Commented May 9, 2017 at 11:07
  • $\begingroup$ @Bemte. but you wouldn't "run the standard normal distribution" would you? $\endgroup$ Commented May 9, 2017 at 11:07
  • $\begingroup$ I would use $D$ to generate the random values $x_i$ or use $D$ to sample from distribution $N(\mu, \sigma)$. Note that $x_i$ are not variables, they are numbers/realisations of random variables. $\endgroup$
    – Antoine
    Commented May 9, 2017 at 11:10
  • 1
    $\begingroup$ @goblin, I don't think natural language exists for talking about "the probability measures themselves", since "$x$ 'comes from' the normal distribution" in some sense carries about as much info as "$x$ is a real number". If you want to do stuff with multiple variables that 'come from' distributions in the abstract, that's arguably what the concept of "random variable" is for. $\endgroup$
    – Mark S.
    Commented May 9, 2017 at 12:01
  • 1
    $\begingroup$ Am I missing why "sample" isn't an appropriate enough word choice? $\endgroup$ Commented May 9, 2017 at 18:01

5 Answers 5

6
$\begingroup$

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.

$\endgroup$
5
$\begingroup$

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.

$\endgroup$
3
  • 2
    $\begingroup$ I'd vote again call, as this is a quite weak verb, which matches almost every action that you can run using a computer. It's not very specific, and pretty vague. From a technical point of view, of course, it is correct, but the question is about the domain, not about the technical implementation. I.e., it does not matter that the RNG is implemented as a function in a programming language. I'd only use call if the focus is on the actual function call (which it isn't in the question). $\endgroup$
    – Golo Roden
    Commented May 9, 2017 at 14:33
  • $\begingroup$ @GoloRoden, I assume by "again" you mean "against" but I don't see how the lack of specificity is an issue here. I interpreted OP to mean $D$ was implemented as a function/method. If $D$ is a standalone program then perhaps "run" is more appropriate. $\endgroup$
    – user307169
    Commented May 9, 2017 at 14:37
  • $\begingroup$ Yes, I meant against, sorry for the typo :-( $\endgroup$
    – Golo Roden
    Commented May 10, 2017 at 8:04
2
$\begingroup$

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

$\endgroup$
3
  • 1
    $\begingroup$ ... as well as the rate of keyboard presses, temperature fluctuations, times between network events, .... Computers have a lot of sources they can mix to provide an underlying random number generator, even if nearly all purposes don't actually need to go that far. $\endgroup$
    – user14972
    Commented May 9, 2017 at 17:07
  • $\begingroup$ And as an aside, the philosophical waters have other dimensions too; e.g. there are various theorems about 'true' randomness being computationally indistinguishible from more deterministic phenomena. $\endgroup$
    – user14972
    Commented May 9, 2017 at 17:17
  • $\begingroup$ Within just pseudo-random number generators, there are choices of algorithm that give varying degrees of performance (according to both mathematical criteria and computer efficiency). By your reasoning, one should always specifying the specific algorithm used, which is unnecessarily pedantic. There will be cases where such details really matter, but that's not unlike any other domain where you can have varying levels of descriptiveness depending on context. In practice, all common RNG are pseudo-random, and in my experience most people - even non-mathematicians - are aware of this fact. $\endgroup$
    – Brick
    Commented May 10, 2017 at 12:52
2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .