Lecture 30 - Chapter 14 General Linear Squares and...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 14 General Linear Squares and Nonlinear Regression y = - 20.5717 +3.6005x Error S r = 4201.3 Correlation r = 0.4434 x = [-2.5 3.0 1.7 -4.9 0.6 -0.5 4.0 -2.2 -4.3 -0.2]; y = [-20.1 -21.8 -6.0 -65.4 0.2 0.6 -41.3 -15.4 -56.1 0.5]; Preferable to fit a parabola Large error, poor correlation Polynomial Regression Quadratic Least Squares y = f ( x ) = a + a x + a x =--- = n 1 i 2 2 i 2 i 1 i 2 1 r x a x a a y a a a S ) ( ) , , ( ( 29 ( 29 ( 29 ---- = = ---- = = ---- = = = = = n 1 i 2 i 2 i 1 i 2 i 2 r n 1 i 2 i 2 i 1 i i 1 r n 1 i 2 i 2 i 1 i r x a x a a y x 2 a S x a x a a y x 2 a S x a x a a y 2 a S Quadratic Least Squares Use Cholesky decomposition to solve for the symmetric matrix or use MATLAB function z = A\r = = = = = = = = = = = = n 1 i i 2 i n 1 i i i n 1 i i 2 1 n 1 i 4 i n 1 i 3 i n 1 i 2 i n 1 i 3 i n 1 i 2 i n 1 i i n 1 i 2 i n 1 i i y x y x y a a a x x x x x x x x n Standard Error for 2 Polynomial Regression / 3 r y x S s n =- where n observations 2 nd order polynomial (3 coefficients) (start off with n degrees of freedom, use up m+1 for m th-order polynomial) [x,y]=example2 z=Quadratic_LS(x,y) x y (a0+a1*x+a2*x^2) (y-a0-a1*x-a2*x^2)-2.5000 -20.1000 -18.5529 -1.5471 3.0000 -21.8000 -22.0814 0.2814 1.7000 -6.0000 -6.3791 0.3791-4.9000 -65.4000 -68.6439 3.2439 0.6000 0.2000 -0.2816 0.4816-0.5000 0.6000 -0.7740 1.3740 4.0000 -41.3000 -40.4233 -0.8767-2.2000 -15.4000 -14.4973 -0.9027-4.3000 -56.1000 -53.1802 -2.9198-0.2000 0.5000 0.0138 0.4862 err = 25.6043 Syx = 1.9125 r = 0.9975 z = 0.2668 0.7200 -2.7231 2 Correlation coefficient r Standard error of the estimate function [x,y] = example2 x = [ -2.5 3.0 1.7 -4.9 0.6 -0.5 4.0 -2.2 -4.3 -0.2]; y = [-20.1 -21.8 -6.0 -65.4 0.2 0.6 -41.3 -15.4 -56.1 0.5]; Quadratic Least Square: y = 0.2668 + 0.7200 x - 2.7231 x 2 Error S r = 25.6043 Correlation r = 0.9975 Cubic Least Squares...
View Full Document

Page1 / 28

Lecture 30 - Chapter 14 General Linear Squares and...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online