1. Learn
  2. /
  3. Courses
  4. /
  5. Mixture Models in R

Connected

Exercise

Expectation function

So far, you have learned how the Expectation-Maximization algorithm is used to estimate the parameters of two Gaussian distributions with both sd equal 1. The aim of this exercise is to create the function expectation, which generalizes the step of estimating the probabilities when we know the means, proportions and the sds.

Instructions

100 XP

Create the function expectation by completing the sample code. Observe that we are now considering the standard deviations of each cluster as its fourth parameter.