Skip to content
DeepForgeby svx
All problems
HardInformation Theoryinfo-122

MI from LLRs

Problem

Estimate the mutual information in bits from a list of nonnegative LLR samples using the standard J-function style estimator:

I = 1 - mean(log2(1 + exp(-L_i)))

Assume every sample is nonnegative and the list is non-empty.

Hint

Zero LLRs mean the observations carry no information about the bits.

Test cases

case 1
in: [[0,0]]
expected: 0
case 2
in: [[1,2,3]]
expected: 0.7649479245566632
case 3
in: [[0.5,1.5,2.5]]
expected: 0.6372199067226494
case 4
in: [[10,10]]
expected: 0.999934503233238
Starter codePython
import math
def mi_from_llrs(llrs):
    # Your code here
    pass

4 test cases · run your code against them in the editor