📡 Entropy of an Information Source
Information Theory • Mathematical Explanation • Numerical Examples
📖 1. What is Entropy?
In Information Theory, entropy measures the average amount of uncertainty or information produced by an information source.
If the outcome of a source is highly uncertain, its entropy is high. If the outcome is almost certain, its entropy is low.
🎲 More uncertainty → More information → Higher entropy
🎯 Less uncertainty → Less information → Lower entropy
📐 2. Information Content of an Event
Suppose an event x occurs with probability P(x). The information contained in that event is:
The unit is called a bit when the logarithm is base 2.
Example
Suppose an event has probability:
Then:
= −(−1)
= 1 bit
Therefore, an event having probability 1/2 carries 1 bit of information.
🧮 3. Mathematical Formula of Entropy
Suppose an information source can produce n different symbols:
with probabilities:
where:
The entropy of the source is:
or explicitly:
📊 4. Why Do We Take an Average?
The information associated with an individual symbol is:
The average information is obtained by multiplying each information value by its probability:
Substituting:
Therefore:
🎯 Example 1 — Fair Coin
Consider a fair coin with two possible outcomes:
| Symbol | Probability |
|---|---|
| Head (H) | 0.5 |
| Tail (T) | 0.5 |
Using:
Therefore:
Since:
Therefore:
= −[−0.5 − 0.5]
= 1 bit
🎲 Example 2 — Biased Coin
Suppose:
| Outcome | Probability |
|---|---|
| Head | 0.8 |
| Tail | 0.2 |
Entropy:
Using approximate values:
log₂(0.2) ≈ −2.3219
Therefore:
≈ 0.722 bits
Notice that this is less than 1 bit because the coin is biased, so there is less uncertainty.
📦 Example 3 — Three Symbol Source
Consider a source:
with probabilities:
| Symbol | Probability |
|---|---|
| A | 0.5 |
| B | 0.3 |
| C | 0.2 |
Check:
Entropy:
Using approximate logarithms:
🏆 5. Maximum Entropy
For a source having n equally probable symbols:
The entropy becomes:
Therefore:
Example
For 4 equally probable symbols:
For 8 equally probable symbols:
⬇️ 6. Minimum Entropy
If one symbol has probability 1 and all other symbols have probability 0:
Then:
There is no uncertainty because the outcome is completely predictable.
⭐ 7. Important Properties of Entropy
1️⃣ Non-Negative
Entropy cannot be negative.
2️⃣ Certain Event
A completely predictable source has zero entropy.
3️⃣ Maximum
Maximum entropy occurs when all symbols are equally probable.
4️⃣ Unit
When log₂ is used, entropy is measured in bits/symbol.
🎬 Animated Entropy Calculation
The following animation demonstrates how the entropy of a source is calculated from probability → information → weighted information → total entropy.
📡 Probability → Information → Entropy
🧮 General Numerical Example
Suppose an information source produces four symbols:
| Symbol | Probability | Information |
|---|---|---|
| A | 0.4 | −log₂(0.4) |
| B | 0.3 | −log₂(0.3) |
| C | 0.2 | −log₂(0.2) |
| D | 0.1 | −log₂(0.1) |
Therefore:
Approximate calculation gives:
🌍 8. Real-Life Applications
Entropy helps measure the information generated by a communication source.
Entropy provides a theoretical limit for lossless data compression.
It can be used to analyze information transmitted through communication channels.
Entropy is used in decision trees to measure impurity and choose useful splits.
📌 Important Formulas for Examination
I(x) = −log₂P(x)
H(X) = −Σpᵢlog₂pᵢ
Hmax = log₂n
Hmin = 0
🎯 Quick Revision
- 📡 Entropy measures the average uncertainty of an information source.
- 🧮 Information of an event = −log₂P(x).
- 📊 Entropy = −Σpᵢlog₂pᵢ.
- 🎲 A fair binary source has entropy 1 bit.
- 📉 A biased source has lower entropy than an equally probable source with the same number of symbols.
- 🏆 Maximum entropy for n symbols is log₂n.
- ⬇️ Minimum entropy is 0.
- 💾 Entropy is fundamental in information theory and data compression.
No comments:
Post a Comment