I need a data set with a mean of 0 and stdv of 1. how do i get this?
2 Answers
$\begingroup$
$\endgroup$
You could buy a copy of A Million Random Digits with 100,000 Normal Deviates.
$\begingroup$
$\endgroup$
4
In R, for instance,
rnorm(10000)
will give you ten thousand N(0,1) (pseudo)random observations. You could use runif
to obtain uniform distributions, or any distribution of your choice by setting parameters so that mean is 0 and variance is 1.
-
$\begingroup$ You forgot to scale the results. $\endgroup$ Commented Jun 12, 2018 at 7:37
-
$\begingroup$ @Michael M: ?? I think rnorm will by default produce mena 0 and variance 1, runif of course will need to set parameters. $\endgroup$ Commented Jun 12, 2018 at 9:57
-
1$\begingroup$ Not exactly. It will sample from a distribution with these parameters, but the specific sample will have a mean different of 0. $\endgroup$ Commented Jun 12, 2018 at 10:23
-
$\begingroup$ If this is what it was asked, then I guess there should be no problem centering and standardizing the sample. $\endgroup$ Commented Jun 12, 2018 at 10:26