Skip to content
DeepForgeby svx
All problems
HardStatisticsst-349

Slope Confidence Interval

Problem

A symmetric confidence interval for a slope is [b - t * se, b + t * se], where t is the critical value for the desired level.

Given the slope, its standard error, and the critical value, return [lower, upper].

Hint

Center the interval at the estimate.

Test cases

case 1
in: [2,0.5,2]
expected: [1,3]
case 2
in: [0,1,1.96]
expected: [-1.96,1.96]
case 3
in: [-3,0.1,2.576]
expected: [-3.2576,-2.7424]
Starter codePython
def slope_confidence_interval(slope, se, t_crit):
    # Your code here
    pass

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