The data are modelled as f(x) = λφA(x) + (1 − λ)φB(x) with unknown labels. The E step computes, for every observation, the posterior probability w(x, A) that it came from component A (bottom panel). The M step re-estimates λ, the two means and the two standard deviations as weighted averages with these weights. Each full iteration can only raise the log-likelihood (right panel), which is the monotonicity result proved in the notes.
The quartile start puts the two means at the lower and upper quartiles of the data, λ = 1/2 and both standard deviations at the overall standard deviation; it is the start used by the course's R code, so the converged numbers can be compared with R (shown in the scoreboard). "Random weights" draws a membership weight for every observation from a seeded uniform generator and begins with an M step, as in Exercise 4.1. The algorithm stops when the log-likelihood changes by at most 10−12.
code/ch04_mixture_models.R (function em_mix2, Figure 4.28).