# Problems 2.1, 2.2 and 2.3 pages 88-92 How Fitting! – The Least Squares Line and How Fitting! – The Least Squares Exponential Fitting Models to Data.

## Presentation on theme: "Problems 2.1, 2.2 and 2.3 pages 88-92 How Fitting! – The Least Squares Line and How Fitting! – The Least Squares Exponential Fitting Models to Data."— Presentation transcript:

problems 2.1, 2.2 and 2.3 pages 88-92 How Fitting! – The Least Squares Line and How Fitting! – The Least Squares Exponential Fitting Models to Data

YearAverage IQ 1932100 1947106 1952108 1972112 1978113 1997118 t (years since 1932) Average IQ 0100 15106 30108 40112 46113 65118 Data Driven Models What function (linear or exponential) describes the pattern made by the following IQ data?

tIQ 0100 15106 30108 40112 46113 65118 Data Driven Models Plot data points and take a close look. Linear or Exponential or Neither ?

Data Driven Models What function (linear) best describes the pattern made by the following IQ data? tIQ 0100 15106 30108 40112 46113 65118 m = (106-100)/15 =.40 b = 100 y1(t) = 100 +.4*t To measure the goodness of this model, we use the sum of the square errors (as outlined on pages 88 & 89).

T (years since 1932) y(t) (IQ) y1(t) 100+.4t Error (y-y1) Square error (y-y1) 2 0100 00 15106 00 30108112416 40112116416 46113118.45.429.16 65118126864 Sum of Square Errors (SSE) 0 + 0 + 16 + 16 + 29.16 + 64 = 125.16 Goodness of Fit y1(t) = 100 +.4*t We compute the SSE.

Data Driven Models What function (linear) best describes the pattern made by the following IQ data? tIQ 0100 15106 30108 40112 46113 65118 m = (118-113)/19 =.2631578947 y2(t) = 118 +.2631578947*(x-65) To measure the goodness of this model, we use the sum of the square errors (as outlined on pages 88 & 89).

T (years since 1932) y(t) (IQ) y2(t)Error (y-y2) Square error (y-y2) 2 0100100.895.895.801 15106104.842-1.1581.341 30108108.790.789.623 40112111.421-.579.335 46113 00 65118 00 Sum of Square Errors (SSE).801 + 1.341 +.623 +.335 + 0 + 0 = 3.10 Goodness of Fit y2(t) = 118 +.2631578947*(x-65) We compute the SSE.

SSE = 3.10SSE = 125.16 Goodness of Fit Compare Linear Models

Data Driven Models How do we find the best (smallest SSE) linear model? Use Maple’s LinearFit command

T (years since 1932) y(t) (IQ) y10(t)Error (y-y10) Square error (y-y10) 2 0100100.718.718.516 15106104.751-1.2501.561 30108108.783.783.613 40112111.471-.529.279 46113113.084.084.007 65118118.192.192.037 Sum of Square Errors (SSE).516 + 1.561 +.613 +.279 +.007 +.037 = 3.013 Goodness of Fit y10(t) = 100.718+.269*t We compute the SSE.

Data Driven Models What function (exponential) best describes the pattern made by the following IQ data? tIQ 0100 15106 30108 40112 46113 65118 c = 100 a = (113/100) ^ (1/46) = 1.002660438 y3(t) = 100 * (1.002660438)^t To measure the goodness of this model, we use the sum of the square errors (as outlined on pages 88 & 89).

T (years since 1932) y(t) (IQ) y3(t)Error (y-y3) Square error (y-y3) 2 0100 00 15106104.066-1.9343.741 30108108.297.297.088 40112111.213-.787.620 46113 00 65118118.851.851.724 Sum of Square Errors (SSE) 0 + 3.741 +.088 +.620 + 0 +.724 = 5.173 Goodness of Fit y3(t) = 100 * (1.002660438)^t We compute the SSE.

Data Driven Models How do we find the best (smallest SSE) exponential model? Use Maple’s LinearFit command

T (years since 1932) y(t) (IQ) y20(t)Error (y-y20) Square error (y-y20) 2 0100100.874.874.764 15106104.681-1.3191.739 30108108.632.632.399 40112111.348-.652.425 46113113.011.011.000 65118118.440.440.194 Sum of Square Errors (SSE).764 + 1.739 +.399 +.425 +.000 +.194 = 3.521 Goodness of Fit y20(t) = 100.874 * (1.002472751)^t We compute the SSE.

Goodness of Fit CONCLUSIONS y10(t) = 100.718+.269*t with SSE: 3.013 y20(t) = 100.874 * (1.002472751)^t with SSE: 3.521 Linear Model is best! To predict IQ in 2008: y10(76) = 100.718 +.269*(76) = 121.162 HOMEWORK: See Maple Handout

Download ppt "Problems 2.1, 2.2 and 2.3 pages 88-92 How Fitting! – The Least Squares Line and How Fitting! – The Least Squares Exponential Fitting Models to Data."

Similar presentations