Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-401

Markov Inequality Bound

Problem

For a nonnegative random variable with mean mu, Markov's inequality bounds P(X >= a) by mu / a.

Given the mean and a > 0, return the bound.

Hint

The bound degrades as a grows.

Test cases

case 1
in: [2,4]
expected: 0.5
case 2
in: [1,1]
expected: 1
case 3
in: [10,100]
expected: 0.1
Starter codePython
def markov_inequality_bound(mean, a):
    # Your code here
    pass

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