Description
Return their difference and 1 - entropy/averageCodeLength, or relativeRedundancy zero at a zero average.
A code's symbol cost, length, overhead, and expected rate use different denominators. An ideal information budget is not necessarily the measured size of a practical encoded message.
Return their difference and 1 - entropy/averageCodeLength, or relativeRedundancy zero at a zero average.
When to use this tool
Use Information: Code Redundancy Per Symbol when you need one explicit coding-cost or redundancy component.
How to use the tool and how it works
- Enter averageCodeLength, entropy. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require nonnegative entropy and averageCodeLength at least entropy. Return their difference and 1 - entropy/averageCodeLength, or relativeRedundancy zero at a zero average.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| averageCodeLength | Average Code Length | Required. Finite number. |
| entropy | Entropy | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.redundancy | Redundancy | Calculated result member: number. |
| result.relativeRedundancy | Dimensionless redundancy ratio, with the documented zero-average convention. | Calculated result member: number. |
{
"input": {
"averageCodeLength": 3,
"entropy": 2
},
"output": {
"result": {
"redundancy": 1,
"relativeRedundancy": 0.3333333333333333
}
}
} Limitations and assumptions
- The two inputs must share information units per symbol; the double-zero relative result is a convention, not a defined ratio or codebook validation.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect the complete codebook and format, including headers, termination, padding, and source probabilities.
References
Similar or alternative tools
- Coding Efficiency Fixed Alphabet Term
Multiply positive averageSymbols by log2(alphabet) for bitsPerCodeword.
- Information: Ideal Codeword Length Integer Gap
Compute -ln(probability)/ln(radix) for idealLength, ceil it for integerLength, and return their gap.