working EM algorithm for assignment 5.875