Fall 2011: STAT 598Z: Introduction to Computing for Statisticians

• Generate 1000 data points from a one dimensional Gaussian mixture model with the following parameters and plot the histogram of the generated data.
Mean Variance Proportion
0 1 0.2
1 1 0.3
5 2 0.5

Write code to estimate the parameters of the above Gaussian mixture model from the data points. Use at least two different seed values and check how closely your estimated parameters match the true parameters.

• Generate 1000 data points from a two dimensional Gaussian mixture model with the following parameters and produce a scatter plot of the generated data
Mean $\sigma^2$ Proportion
(0, 0) 1 0.2
(1, 1) 1 0.3
(5, 5) 2 0.5

The variance of the data is $\sigma^2 I$. Write code to estimate the parameters of the above Gaussian mixture model from the data points. Use at least two different seed values and check how closely your estimated parameters match the true parameters. Hint: Look up numpy.random.multivariate_normal.

• Play around with different sample proportions and variance values to generate data and use your GMM code to estimate parameters.