In maximum likelihood estimation, one typically needs to compute the log (natural log) of probability values. When a probability, say $p(x)$, becomes so close to zero, $log(p(x))$ returns Inf. What is the usual trick to avoid these cases?
Take the 2minute tour
×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.
Work with the logs of probability directly, rather than trying to compute the probability and then compute the log. You can do arithmetic with the logs, as well; multiplication becomes addition, of course. Addition is somewhat more complicated, but it's not too hard to work out how to do it without taking the exponential back. In response to JM's question, it's easy to come up with practical problems where the probability of something happening is indeed so low that it underflows a float or double. 


Inf
unless your starting values for your iteration are really bad... – J. M. Oct 21 '10 at 5:29