I have fitted a gaussian mixture distribution to residuals, and now I want to simulate the residuals. However, I want the model to be independent of the time steps(have it as an input to the model).

I know that if the distribution is simply a standard normal gaussian distribution then I can extract the std and the time component dt such that I can simulate where

$\sqrt{\sigma^2*dt}\times N\left((0,1)\right)$

However, in this case I don't have normally distributed residuals, but a gaussian mixture, since I have the residuals and I have the time steps used and could normalise in the same way as with the 'normal case' by dividing out the variance from the gaussian mixture distribution so that the variance become 1.

I guess my question is: would this be valid way?

  • $\begingroup$ Please provide your model as the conjunction of a Gaussian mixture fit and of time steps and of residuals is unclear (to me). Residuals are usually meant in terms of differences between predicted and observed values. $\endgroup$
    – Xi'an
    Commented Mar 23, 2020 at 7:25

1 Answer 1


From MathWorks:

Gaussian Mixture Distribution

Fit, evaluate, and generate random samples from Gaussian mixture distribution

A Gaussian mixture distribution is a multivariate distribution that consists of multivariate Gaussian distribution components. Each component is defined by its mean and covariance, and the mixture is defined by a vector of mixing proportions. Create a distribution object gmdistribution by fitting a model to data (fitgmdist) or by specifying parameter values (gmdistribution). Then, use object functions to perform cluster analysis (cluster, posterior, mahal), evaluate the distribution (cdf, pdf), and generate random variates (random).

Note, working with a multivariate distribution (Y,X) implies that in a spreadsheet approach, for example, one can first generate a value X = x, using the spreadsheet's function for a normal distribution random variate, and then employ this value to generate a y value from the conditional normal distribution associated with the multivariate (Y,X) normal distribution (see, for example, formula here).

If there is another multivariate distribution (R,S) that is independent of the first multivariate distribution (Y,X), that is part of the mixture of random variates, then one generates n of the 1st multivariate distribution and m of the 2nd multivariate distribution where n,m correspond the mixing percentages.

If all the multivariate distributions are correlated simply to the first multivariate distribution, that use the conditional normal distribution associated with the multivariate (Y,X) normal distribution to derives successive random deviates based on their correlation to the first multivariate distribution (Y,X).

However, if the multivariate distributions are also correlated to each other in a more complex covariance matrix structure, this simple spreadsheet approach is not accurate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.