Adding calculation for prob_y