All problems
MI of Gaussian Channel
Problem
Compute the mutual information in bits between an input X ~ N(0, power) and the output Y = X + N with independent noise N ~ N(0, noise_var):
I = 0.5 * log2(1 + power / noise_var)
Hint
Quadrupling the signal-to-noise ratio adds 1 bit.
Test cases
case 1
in: [1,1]
expected: 0.5
case 2
in: [3,1]
expected: 1
case 3
in: [15,1]
expected: 2
case 4
in: [1,4]
expected: 0.16096404744368117
Starter codePython
import math
def gaussian_channel_mi(power, noise_var):
# Your code here
pass4 test cases · run your code against them in the editor