# #Epage 182 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- n = 41 barY = 10 barX = 12 SXY = 100 SXX = 400 s2 = 144 # this is an estimate of the common variance (the same for all x's) b1 = SXY / SXX b0 = barY - b1 * barX ci = 0.90 alpha = 1 - ci t = qt( 1 - alpha/2, n-2 ) print( b1 - t * sqrt( s2 / SXX ) ) print( b1 + t * sqrt( s2 / SXX ) )