FunctionRacerProblemsRace

Which Findings Survive

HardstatsmodelsPython

A study ran many tests, and pvalues holds their p-values. Testing many things at once makes false alarms likely, so correct for it with Holm's method at overall level alpha. Return a list of booleans: True for each test that is still significant after the correction.

Example 1

pvalues [0.01,0.04,0.03,0.2]
alpha 0.05
returns [true,false,false,false]

With four tests the smallest p-value must beat 0.05 / 4 = 0.0125, and 0.01 does. The next must beat 0.05 / 3, and 0.03 does not, so the rest fail too.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More statsmodels problems