# Log probability

In computer science, the use of log probabilities is a way to represent probabilities in a way which has several practical computational advantages over the standard use of approximated real numbers in the $[0, 1]$ interval.
Since the log of a number in $[0, 1]$ is negative, negative log probabilities are more commonly used. The most common log probability representation is therefore to encode a probability $x \in [0, 1]$ as $x' = - \log(x) \in \mathbb{R}$. The product of probabilities $x \cdot y$ can then be replaced with the more efficient calculation $x' + y'$. The sum of probabilities $x + y$ is more complex to express and is written as $- \log(e^{- x'} + e^{- y'})$. 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 nonnegative this gives a lower bound.