added function to calculate probability for z_ij in lda loop