How to simulate a Gaussian process in R with predefined mean and variance

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
Mark J.
Messages
81
Reaction score
0
Hi everybody

Any ideas how to simulate a Gaussian stationary process in R language using predefined variance and mean?
I have a uni-variate normal distribution for my real life process
Thank you
 
Physics news on Phys.org
Let X be the uivariate normal. Then Y=σX + m where σ is the standard deviation and m is the mean of the process (Y) that you want to simulate. (I don't know what R language is.)
 
Hey MarkJ.

In R, you should use output = rnorm(n,mean,standard_deviation) to simulate from a normal distribution with n observations given those probabilities (you will get a random vector of size n from this distribution).