Calculator
Choose an input style, set the logarithm base, and calculate self-information, related unit conversions, and practical rarity measures.
Example Data Table
| Scenario | Probability | Bits | Nats | Hartleys |
|---|---|---|---|---|
| Coin landing heads | 0.5000 | 1.0000 | 0.6931 | 0.3010 |
| Two heads in a row | 0.2500 | 2.0000 | 1.3863 | 0.6021 |
| Rare defect event | 0.1000 | 3.3219 | 2.3026 | 1.0000 |
| Critical alarm trigger | 0.0100 | 6.6439 | 4.6052 | 2.0000 |
These examples show how self-information rises sharply as event probability falls.
Formula Used
Core self-information formula
I(x) = -logb(P(x))
Probability conversion formulas
Percentage: P = percentage / 100
Frequency: P = successes / total trials
Odds: P = favorable / (favorable + unfavorable)
Additional derived measures
Entropy contribution: P(x) × I(x)
Repeated independent events: n × I(x)
Effective search space: 1 / P(x)
How to Use This Calculator
- Enter a short label for the event you want to measure.
- Select how you want to provide the probability: direct value, percentage, frequency, or odds.
- Fill only the fields related to the selected input style.
- Choose the reporting base: 2 for bits, e for nats, 10 for hartleys, or a custom base.
- Set repeated events and sample size if you want extended practical outputs.
- Press the calculate button to show the result above the form.
- Review the graph, converted units, and interpretation note.
- Use the CSV or PDF buttons to export the current result summary.
Frequently Asked Questions
1) What does information content measure?
It measures how surprising an event is. Rare events carry more self-information, while common events carry less because they reveal less unexpected evidence.
2) Why do smaller probabilities create larger values?
Because self-information is the negative logarithm of probability. As probability decreases, the logarithm becomes more negative, so the final positive information value grows.
3) Which base should I choose?
Choose base 2 for bits, base e for nats, and base 10 for hartleys. Use a custom base when your model or report requires a special logarithm scale.
4) Can the event probability equal 1?
Yes. A certain event has zero self-information because it creates no surprise. The calculator accepts 1 and returns a value of 0.
5) Why is zero probability not allowed?
Because log(0) is undefined and would imply infinite information. In practical modeling, zero probabilities are usually replaced with very small positive estimates or smoothing methods.
6) How is self-information different from entropy?
Self-information describes one specific event. Entropy is an average uncertainty measure across all possible outcomes in a probability distribution.
7) Can I enter frequencies or odds instead of probability?
Yes. The calculator converts percentages, observed frequencies, and odds into probability first, then applies the same self-information formula.
8) What does repeated event information mean?
For independent identical events, total information adds linearly. Two repeats produce twice the self-information, three repeats produce three times, and so on.