๐ก 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