HW2 question 2 mutual information function done