log-probabilities are used instead of probabilities: avoids numerical underflow

Why can't we just add up tiny chances over time?

Image: WolfgangRieger, Public domain, via Wikimedia Commons

log-probabilities are used instead of probabilities: avoids numerical underflow

Why can't we just add up tiny chances over time?

Imagine you're rolling a fair six-sided die repeatedly. Each roll is independent, and you're curious about the chance of rolling a six after many rolls.

As you keep rolling, the chance of rolling a six each time stays the same. But when you try to add up all those tiny chances over time, they can become incredibly small numbers that computers struggle to handle.

Example

After 100 rolls, the chance of rolling a six each time is 1/6. Adding up 100 tiny chances (1/6 each) gives you a tiny number that's hard to work with.

Remember this

Log-probabilities help us avoid tiny numbers that computers can't handle well, making calculations easier.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath