Log probability: Difference between revisions

Content deleted Content added
Yoderj (talk | contribs)
merged two duplicate paragraph fragments and clarified third bullet.
Yoderj (talk | contribs)
mNo edit summary
Line 13:
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]].
 
== Basic manipulations ==
Any base can be selected for the logarithm.
 
Line 19 ⟶ 18:
: <math>y' = \log(y) \in \mathbb{R}</math>
 
== Basic manipulations ==
The product of probabilities <math>x \cdot y</math> corresponds to addition in logarithmic space.
 
Line 27:
However, in many applications a multiplication of probabilities (giving the probability of all independent events occurring) is used more often than their addition (giving the probability of at least one of them occurring). Additionally, the cost of computing the addition can be avoided in some situations by simply using the highest probability as an approximation. Since probabilities are non-negative this gives a lower bound. This approximation is used in reverse to get a [[LogSumExp|continuous approximation of the max function]].
 
===Addition in log space===
 
: <math>\log(x + y)</math>