`rnorm`

is an R language function defined as:

`rnorm.X generates multivariate normal random variates in the space X. `

Consider `rnorm(1000, 50, 5)`

, drawing 1000 values from a normal distribution with mean 50 and standard deviation 5.

Are these 1000 values iid? If they are then the sampling is done with replacement. Are `rnorm`

and `runif`

samples generated with replacement or without replacement?

**Contents**hide

#### Best Answer

Both the normal and uniform distributions are continuous; ie, any particular value has probability of zero. Obviously there is numerical precision and other considerations involved with a machine-specific implementation but for all intents and purposes, you can suppose that $mathbb P(X = x) = 0$ for any particular $x$; ie, the probability that you randomly draw a value identical to any particular point you specify is $0$. Further, if you have any countable (ie, you could count it out, possibly infinite) or finite (ie, you have a set with a fixed number of elements) set $mathcal X$, $mathbb P(X in mathcal X) = 0$ as well. That is, for any countable set of real numbers within the support of the distribution (for the uniform case, this would be $[0, 1]$, and for the normal case, the support is just all of the reals) there is also a probability of $0$ that a "new draw" or any finite number of draws will be equal to any of them (this applies for *all* continuous distributions; one can define mixed distributions in which this is NOT the case, but for continuous random variables, this is *always* the case as by definition a continuous distribution is defined over uncountably infinitely many points). There is no such thing as "with replacement" and "without replacement" if the distn function is continuous; further, if the distribution is discrete "without replacement" explicitly violates $iid$ (as you are specifically and deliberately omitting values from the possible sets of values based completely on the values you have already obtained). `rnorm`

and `runif`

generate $iid$ samples.

### Similar Posts:

- Solved – Do we draw samples with or without replacement when we state the central limit theorem
- Solved – take the “derivative” of a cumulative distribution function
- Solved – take the “derivative” of a cumulative distribution function
- Solved – How to calculate sample size so I can be confident that the sample mean approximates the population mean
- Solved – How/Why does resampling from “any” distribution lead to a normal distribution