Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-373

Benjamini Hochberg Rank Threshold

Problem

In the Benjamini-Hochberg procedure the threshold for the p-value at rank i (1-based, sorted ascending) is i * alpha / m.

Given the rank, alpha, and the number of tests m, return the threshold.

Hint

The threshold grows linearly with the rank.

Test cases

case 1
in: [1,0.05,10]
expected: 0.005
case 2
in: [5,0.05,10]
expected: 0.025
case 3
in: [10,0.1,10]
expected: 0.1
Starter codePython
def benjamini_hochberg_rank_threshold(rank, alpha, m):
    # Your code here
    pass

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