Curve-Fitting Regression

Slides:



Advertisements
Similar presentations
Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
Advertisements

11-1 Empirical Models Many problems in engineering and science involve exploring the relationships between two or more variables. Regression analysis.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
6-1 Introduction To Empirical Models 6-1 Introduction To Empirical Models.
Chapter 10 Curve Fitting and Regression Analysis
Correlation and Regression
Definition  Regression Model  Regression Equation Y i =  0 +  1 X i ^ Given a collection of paired data, the regression equation algebraically describes.
P M V Subbarao Professor Mechanical Engineering Department
Read Chapter 17 of the textbook
Curve-Fitting Interpolation
Curve Fitting and Interpolation: Lecture (IV)
Function Approximation
Least Square Regression
Curve-Fitting Regression
Least Square Regression
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 17 Least Square Regression.
Curve-Fitting Polynomial Interpolation
Part 4 Chapter 13 Linear Regression
Engineering Computation Curve Fitting 1 Curve Fitting By Least-Squares Regression and Spline Interpolation Part 7.
1 Curve-Fitting Regression – Examples. 2 Example 1 x y Using least-square regression Fit a line to the data Fit a parabola to the data.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 CURVE.
Chi Square Distribution (c2) and Least Squares Fitting
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Classification and Prediction: Regression Analysis
Calibration & Curve Fitting
Least-Squares Regression
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
1 FORECASTING Regression Analysis Aslı Sencer Graduate Program in Business Information Systems.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Chapter 8 Curve Fitting.
ES 240: Scientific and Engineering Computation. Chapter 13: Linear Regression 13. 1: Statistical Review Uchechukwu Ofoegbu Temple University.
CHAPTER 3 Model Fitting. Introduction Possible tasks when analyzing a collection of data points: Fitting a selected model type or types to the data Choosing.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
NON-LINEAR REGRESSION Introduction Section 0 Lecture 1 Slide 1 Lecture 6 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall.
MODEL FITTING jiangyushan. Introduction The goal of model fitting is to choose values for the parameters in a function to best describe a set of data.
Curve Fitting Pertemuan 10 Matakuliah: S0262-Analisis Numerik Tahun: 2010.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
Principles of Extrapolation
Chapter 13 Objectives Familiarizing yourself with some basic descriptive statistics and the normal distribution. Knowing how to compute the slope and intercept.
Curve Fitting Introduction Least-Squares Regression Linear Regression Polynomial Regression Multiple Linear Regression Today’s class Numerical Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression.
One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to.
OLS Regression What is it? Closely allied with correlation – interested in the strength of the linear relationship between two variables One variable is.
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
CORRELATION-REGULATION ANALYSIS Томский политехнический университет.
ELEC 413 Linear Least Squares. Regression Analysis The study and measure of the statistical relationship that exists between two or more variables Two.
Regression and Correlation of Data Summary
Inference for Least Squares Lines
Part 5 - Chapter
Part 5 - Chapter 17.
Chapter 18.
Chapter 12 Curve Fitting : Fitting a Straight Line Gab-Byung Chae
Part 5 - Chapter 17.
Today’s class Multiple Variable Linear Regression
Regression Models - Introduction
Linear regression Fitting a straight line to observations.
Nonlinear regression.
5.2 Least-Squares Fit to a Straight Line
M248: Analyzing data Block D UNIT D2 Regression.
Nonlinear Fitting.
Discrete Least Squares Approximation
Least Square Regression
SKTN 2393 Numerical Methods for Nuclear Engineers
Presentation transcript:

Curve-Fitting Regression

Applications of Curve Fitting To fit curves to a collection of discrete points in order to obtain intermediate estimates or to provide trend analysis

Applications of Curve Fitting To obtain a simplified version of a complicated function e.g.: In the applications of computing integration Hypothesis testing Compare theoretical data model to empirical data collected through experiments to test if they agree with each other.

Two Approaches Regression – Find the "best" curve to fit the points. The curve does not have to pass through the points. (Fig (a)) Uses when data have noises or when only approximation is needed. Interpolation – Fit a curve or series of curves that pass through every point. (Figs (b) & (c))

Curve Fitting Regression Interpolation Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression Interpolation Newton's Divided-Difference Interpolation Lagrange Interpolating Polynomials Spline Interpolation

Linear Regression – Introduction Some data exhibit a linear relationship but have noises A curve that interpolates all points (that contain errors) would make a poor representation of the behavior of the data set. A straight line captures the linear relationship better.

Linear Regression Objective: Want to fit the "best" line to the data points (that exhibit linear relation). How do we define "best"? Pass through as many points as possible Minimize the maximum residual of each point Each point carries the same weight

Linear Regression Objective Given a set of points ( x1, y1 ) , (x2, y2 ), …, (xn, yn ) Want to find a straight line y = a0+ a1x that best fits the points. The error or residual at each given point can be expressed as ei = yi – a0 – a1xi

Residual (Error) Measurement

Criteria for a "Best" Fit Minimize the sum of residuals e.g.: Any line passing through mid-points would satisfy the criteria. Inadequate Minimize the sum of absolute values of residuals (L1-norm) e.g.: Any line within the upper and lower points would satisfy the criteria. Inadequate

Criteria for a "Best" Fit Minimax method: Minimize the largest residuals of all the point (L∞-Norm) e.g.: Data set with an outlier. The line is affected strongly by the outlier. Inadequate Outlier Note: Minimax method is sometimes well suited for fitting a simple function to a complicated function. (Why?)

Least-Square Regression Minimize the sum of squares of the residuals (L2-Norm) Unique solution

Least-Squares Fit of a Straight Line

Least-Squares Fit of a Straight Line These are called the normal equations. How do you find a0 and a1?

Least-Squares Fit of a Straight Line Solving the system of equations yields

Quantification of Error of Linear Regression Sy/x is called the standard error of the estimate. Similar to "standard deviation", Sy/x quantifies the spread of the data points around the regression line. The notation "y/x" designates that the error is for predicted value of y corresponding to a particular value of x.

"Goodness" of our fit Let St be the sum of the squares around the mean for the dependent variable, y Let Sr be the sum of the squares of residuals around the regression line St - Sr quantifies the improvement or error reduction due to describing data in terms of a straight line rather than as an average value.

"Goodness" of our fit For a perfect fit Sr=0 and r=r2=1, signifying that the line explains 100 percent of the variability of the data. For r=r2=0, Sr=St, the fit represents no improvement. e.g.: r2=0.868 means 86.8% of the original uncertainty has been explained by the linear model.

Linearization of Nonlinear Relationships Linear regression is for fitting a straight line on points with linear relationship. Some non-linear relationships can be transformed so that in the transformed space the data exhibit a linear relationship. For examples,

Fig 17.9

Polynomial Regression Objective Given n points ( x1, y1 ) , (x2, y2 ), …, (xn, yn ) Want to find a polynomial of degree m y = a0+ a1x + a2x2 + …+ amxm that best fits the points. The error or residual at each given point can be expressed as ei = yi – a0 – a1x – a2x2 – … – amxm

Least-Squares Fit of a Polynomial The procedures for finding a0, a1, …, am that minimize the sum of squares of the residuals is the same as those used in the linear least-square regression.

The standard error of the estimate becomes Least-Squares Fit of a Polynomial To find a0, a1, …, an that minimize Sr, we can solve this system of linear equations. The standard error of the estimate becomes

Multiple Linear Regression In linear regression, y is a function of one variable. In multiple linear regression, y is a linear function of multiple variables. Want to find the best fitting linear equation y = a0+ a1x1 + a2x2 + …+ amxm Same procedure to find a0, a1, a2, … ,am that minimize the sum of squared residuals The standard error of estimate is

General Linear Least Square All of simple linear, polynomial, and multiple linear regressions belong to the following general linear least squares model: For polynomial For multiple linear

General Linear Least Square Given n points, we have We can rewrite the above equations in matrix form as

General Linear Least Square The sum of squares of the residuals can be calculated as To minimize Sr, we can set the partial derivatives of Sr to zeroes and solve the resulting normal equations. The normal equations can also be expressed concisely as How should we solve this system?

Non-Linear Regression The equation is non-linear and cannot be linearized using direct method. For example, Solution: approximation + iterative approach. Gauss-Newton method: Use Taylor series to express the original non-linear equation in linear form. Use general least square theory to obtain new estimates of the parameters that minimize the sum of squared residuals