Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The slope of the least squares straight-line fit to points (a1, b1), . . . , (an, bn) is given by c = Pn i=1
The slope of the least squares straight-line fit to points (a1, b1), . . . , (an, bn) is given by c = Pn i=1 (ai a)(bi b) Pn i=1 (ai a) 2 = Pn i=1 aibi na b Pn i=1 a 2 i na 2 , where a = avg(a), b = avg(b). We evaluate the second expression for c for the vectors a = (108 , 1 + 108 , 2 + 108 ), b = (1, 2, 3). These points are on a straight line with slope c = 1. 108 1 + 108 2 + 108 1 2 3 ai bi We used the MATLAB code a = [ 1e8; 1 + 1e8; 2 + 1e8 ]; b = [ 1; 2; 3 ]; c = ( a'*b - 3*mean(a)*mean(b) ) / ( a'*a - 3*mean(a)^2 ); and obtained c = 0.5000. Explain the large error in the result. (Your explanation can be qualitative; you are not expected to explain the exact value 0.5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started