# how do you obtain a data set (around 10,000 data points) with a mean of 0 and standard deviation of 1. [duplicate]

I need a data set with a mean of 0 and stdv of 1. how do i get this?

## 2 Answers

You could buy a copy of A Million Random Digits with 100,000 Normal Deviates.

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.

• You forgot to scale the results. – Michael M Jun 12 '18 at 7:37
• @Michael M: ?? I think rnorm will by default produce mena 0 and variance 1, runif of course will need to set parameters. – F. Tusell Jun 12 '18 at 9:57
• Not exactly. It will sample from a distribution with these parameters, but the specific sample will have a mean different of 0. – Michael M Jun 12 '18 at 10:23
• If this is what it was asked, then I guess there should be no problem centering and standardizing the sample. – F. Tusell Jun 12 '18 at 10:26