Skip to content
DeepForgeby svx
All problems
EasyML Fundamentalsml-279

RD Bandwidth Rule

Problem

Compute a rule-of-thumb regression discontinuity bandwidth: 1.06 * std * n^(-1/5) using the population standard deviation.

Empty input returns 0.0.

Hint

This plug-in rule shrinks the bandwidth as the sample grows.

Test cases

case 1
in: [[1,2,3,4]]
expected: 0.8981499984950554
case 2
in: [[5,5,5]]
expected: 0
case 3
in: [[0]]
expected: 0
case 4
in: [[]]
expected: 0
Starter codePython
def bandwidth_rule(values):
    # Your code here
    pass

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