# RandomVariate form a Specific Distribution with Restrictions

There are a lot of questions about generating random numbers form both uni-variate and bi-variate distributions. Mathematica has a lot of built in distributions for that purpose. However, I could not do what I wanted to do. I am looking for help.

I want to generate random numbers using built in Mathematica distribution but would like to put some restriction. For example, the following code gives me 2000 random numbers form exponential distribution.

example1=RandomVariate[ExponentialDistribution[0.0067], 2000];


However, I am trying to get 2000 random variables greater than say 20 from exponential distribution. Similarly, the following code gives me 2000 random numbers a form Farlie-Gumbel-Morgenstern copula.

   example2=RandomVariate[
ExponentialDistribution[0.0067]}], 2000];


However, I want to get 2000 random numbers form Normal distribution between -.02 and .02 or I want random numbers form exponential distribution between 40 and 1000.

Any help is greatly appreciated. Thank you in advance.

• TruncatedDistribution may be what you are after. – Andy Ross Dec 18 '14 at 1:28
• @ Andy, you are right. But I am also expecting some innovative answers, which I always get form this community. – ramesh Dec 18 '14 at 2:19

d1 = RandomVariate[ExponentialDistribution[.1], 2000];