question: static private double calcLogProb ( int numAppear , double mu ) { final double sigma = calcSigmaFromMu ( mu ) ; final double logNumAppear = Math . log ( numAppear ) ; final double overMu = Math . max ( logNumAppear - mu , 0.0 ) ; final double res = - ( 1.0 / 2 ) * ( overMu * overMu ) / ( sigma * sigma ) - s_logSqrtTwoPi - Math . log ( sigma ) ; assert ( res <= 0 ) ; return res ; }
target:  Calculate the log probability given the message's logarithm is normally distributed. Note, here we  take the natural logarithm of the normal distribution (lognormal distribution) which using log properties  and rules turns into the equation whose value gets stored in res.