onlineregression13:   Multiple linear regression   ⇒   y = f(x1, x2)


Formulas

t1 = n∑yx2 - ∑y∑x2           t2 = n∑x1∑x2 - ∑x1∑x2

t3 = n∑x22 - (∑x2)2           t4 = n∑y∑x1 - ∑y∑x1

t5 = n∑x1x2 - ∑x1∑x2           t6 = n∑x12 - (∑x1)2

t7 = n∑x22 - (∑x2)2

β1 = (t1*t2 - t3*t4)/(t5*t5 - t6*t7)

β2 = (t4 - β1*t6)/t2

α = (∑y - β1∑x1 - β2∑x2)/n

Reference


SAMPLE INPUT DATA:

Array size n:  12

Corresponding values of arrays y, x1 and x2 (you can cut and paste sample arrays into form).

y:    89,75,57,34,101,121,68,79,25,59,96,12

x1:    3245,2567,2783,1234,5345,5329,3002,2976,1034,2984,3892,534

x2:    0.008,0.011,0.009,0.015,0.006,0.007,0.008,0.010,0.018,0.010,0.007,0.020


SAMPLE OUTPUT:

α = 42.46643        β1 = 0.015533        β2 = -1830.40


Thank you for running onlineregression13.   Please call again.   [070417]