We first tabulate the values of X and Y and calculate X2 and XY
Using matrix;matrix
X′X=[87272816]
X′Y= [5044048]
X′X−1=[0.607−0.0536−0.05360.00595]
b=(X′X−1)X′Y
=[0.607−0.0536−0.05360.00595][5044048]
=[88.9552−2.9288]
constant=88.9552
slope=-2.9288
Comments
Leave a comment