Then A=[x,x.∧0], b=y will prepare you to perform the leastsquares, line-fitting calculation.
a. Enter all these commands and recover the least-squares line. Is it exactly the liney=.7x+ 2.1? Is it close? Perform this experiment several times and summarize your results.
b. What is the effect of the number.3 in these commands? If.3 is replaced by 3, is the line that you recover usually more or less similar toy=.7x+ 2.1? Explain why your observation is reasonable.
c. What is the effect of using fewer or more data points on the recovery of the line? For instance, if the number 10 in these commands is replaced with 3 or 30, is the line you recover usually more or less similar toy=.7x+ 2.1? Explain why your observation is reasonable.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here