Log probability: Difference between revisions

Content deleted Content added
Wetlife (talk | contribs)
Added an explanation why products arise in calculating probabilities. This should help readers understand the motivation for mapping products in a linear space to sums in a logarithmic space.
Tags: Mobile edit Mobile web edit
Yoderj (talk | contribs)
Bring simple definition forward.
Line 1:
{{unreferenced|date=May 2011}}
In [[computer science]], a [[log probability]] is simply the logarithm of a probability. The use of '''log probabilities''' means representing [[probability|probabilities]] in [[logarithm]]ic space, instead of the standard <math>[0, 1]</math> [[interval (mathematics)|interval]]. This has practical advantages, because of the way in which computers [[Floating point|approximate real numbers]], and because computers can historically perform addition more efficiently than multiplication. Multiplication arises from calculating the probability that multiple independent events occur: the probability that all independent events of interest occur is the product of all these events' probabilities.
 
A log probability is simply the logarithm of a probability. The logarithm function is not defined for zero, so log probabilities can only represent non-zero probabilities. Since the logarithm of a number in <math>[0, 1)</math> interval is negative, often the negative log probabilities are used. In that case the log probabilities in the following formulas would be [[Additive inverse|inverted]]. Any base can be selected for the logarithm.
 
: <math>x' = \log(x) \in \mathbb{R}</math>