One way to do this is to use the idea of a "contaminated normal distribution," which is a specific kind of mixture distribution. After you define the x variable simulate the y variable as follows: type = rand("Bernoulli", 0.1); /* outlier with 10% probability */ if type=1 then error = rand("Normal", 0, 10); /* error is N(0, 10) */ else error = rand("Normal", 0, 1); /* error is N(0, 10) */ y = intercept + beta*x + error; outlier = (abs(error)>3); Change the probability of contamination (0.1), the magnitude of the contamination (10) and the definition of an outlier (3) as your needs require. For more info on the general case of sampling from a mixture distribution, see http://blogs.sas.com/content/iml/2011/09/21/generate-a-random-sample-from-a-mixture-distribution/ Rick
... View more