Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-266

Brownian Motion Variance

Problem

Standard Brownian motion with diffusion coefficient sigma has variance sigma^2 * t at time t. Return that variance, or 0.0 for t < 0.

Hint

Brownian variance grows linearly with the time horizon.

Test cases

case 1
in: [1,2]
expected: 2
case 2
in: [2,3]
expected: 12
case 3
in: [0.5,4]
expected: 1
case 4
in: [1,0]
expected: 0
case 5
in: [0,5]
expected: 0
Starter codePython
def brownian_variance(sigma, t):
    # Your code here
    pass

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