Skip to content
DeepForgeby svx
All problems
MediumProbabilitypr-366

Lognormal Median Value

Problem

The lognormal median is exp(mu), since the median of the underlying normal is mu.

Given mu, return the median.

Hint

Monotone transforms preserve medians.

Test cases

case 1
in: [0]
expected: 1
case 2
in: [1]
expected: 2.718281828459045
case 3
in: [-2]
expected: 0.1353352832366127
Starter codePython
def lognormal_median_value(mu):
    # Your code here
    pass

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