Which Findings Survive
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
1 <= len(pvalues) <= 30alphais 0.01, 0.05 or 0.1
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More statsmodels problems
- How Much Is ExplainedBeginner
- How Sure Is the SlopeBeginner
- Line Through ZeroBeginner
- Line Through the DataBeginner
- Reading Off the LineBeginner
- Room for the InterceptBeginner
- Slope From a TableBeginner
- What the Line MissesBeginner