Standard Normal draws with different mean values

Hi, I understand that to produce an set of random standard normal N(0,1) observations with standard deviation of 10 in GAUSS I can use the function rndn(n,1) and premultiply it by 10, but what about its mean 0? Where does the zero applies here? Also, what if for example I want to create standard normal numbers with standard deviation 10 and mean 2? Thanks!

1 Answer



To change the mean, you just add it after the multiplication, like this:

n = 200;
sd = 10;
mean = 2;

X = rndn(n, 1) * sd + mean;

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy