Skip to content
Prev 172476 / 398502 Next

How to generate fake population (ie. not sample) data?

Something like this may help get you started.

std.pop <- function(x,mu,stdev){
  ((x-mean(x))/sd(x)*stdev)+mu
  }

population <- std.pop(rnorm(1000),10,5)

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA