All problems
Outage Probability
Problem
Return the outage probability of a Rayleigh fading channel with mean SNR mean_snr when the SNR must exceed the given threshold:
P_out = 1 - exp(-threshold / mean_snr)
Hint
Rayleigh power is exponential, so the outage probability follows its CDF.
Test cases
case 1
in: [1,1]
expected: 0.6321205588285577
case 2
in: [2,1]
expected: 0.8646647167633873
case 3
in: [0,1]
expected: 0
case 4
in: [1,2]
expected: 0.3934693402873666
Starter codePython
import math
def outage_probability(threshold, mean_snr):
# Your code here
pass4 test cases · run your code against them in the editor