# Test script for the in-class exercise of maximum likelihood using EM. source("binmix.r") # Generate n synthetic observations with mixing proportion true_p. n <- 10000 true_p <- 0.7 set.seed(1) m <- runif(n)