Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-330

Interdecile Range

Problem

The interdecile range is P90 - P10. Use linear interpolation on the sorted values with position (n - 1) * p.

Given the values, return the interdecile range.

Hint

Percentiles interpolate between neighboring order statistics.

Test cases

case 1
in: [[1,2,3,4,5,6,7,8,9,10]]
expected: 7.199999999999999
case 2
in: [[0,0,0]]
expected: 0
case 3
in: [[1,100]]
expected: 79.19999999999999
Starter codePython
def interdecile_range(values):
    # Your code here
    pass

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