1 4. Curve fitting On many occasions one has sets of ordered pairs of data (x 1,...,x n, y 1,...,y n ) which are related by a concrete function Y(X) e.g.

Slides:



Advertisements
Similar presentations
Applied Econometrics Second edition
Advertisements

Excel Notes Phys244/246 © 2007, B.J. Lieb. Calculating Velocity The velocity is calculated by entering the following: =(B3-B2) / (A3-A2). Then drag the.
Forecasting Using the Simple Linear Regression Model and Correlation
Ch11 Curve Fitting Dr. Deshi Ye
Linear Regression Using Excel 2010 Linear Regression Using Excel ® 2010 Managerial Accounting Prepared by Diane Tanner University of North Florida Chapter.
EGR 105 Foundations of Engineering I
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
Excel Part III Curve-Fitting, Regression Section 8 Fall 2013 EGR 105 Foundations of Engineering I.
Regression Regression: Mathematical method for determining the best equation that reproduces a data set Linear Regression: Regression method applied with.
Yard. Doç. Dr. Tarkan Erdik Regression analysis - Week 12 1.
Chapter 12 Simple Regression
Chapter 12a Simple Linear Regression
EGR 105 Foundations of Engineering I Fall 2007 – week 7 Excel part 3 - regression.
Examining Relationship of Variables  Response (dependent) variable - measures the outcome of a study.  Explanatory (Independent) variable - explains.
Business 205. Review Chi-Square Preview Regression.
RESEARCH STATISTICS Jobayer Hossain Larry Holmes, Jr November 6, 2008 Examining Relationship of Variables.
BCOR 1020 Business Statistics Lecture 24 – April 17, 2008.
Spreadsheet Problem Solving
Regression Basics For Business Analysis If you've ever wondered how two or more things relate to each other, or if you've ever had your boss ask you to.
Simple Linear Regression
1 1 Slide © 2009 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Statistics for Business and Economics 8 th Edition Chapter 11 Simple Regression Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Ch.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
EC339: Lecture 6 Chapter 5: Interpreting OLS Regression.
12b. Regression Analysis, Part 2 CSCI N207 Data Analysis Using Spreadsheet Lingma Acheson Department of Computer and Information Science,
Bivariate Regression (Part 1) Chapter1212 Visual Displays and Correlation Analysis Bivariate Regression Regression Terminology Ordinary Least Squares Formulas.
Notes on Data Collection and Analysis Dale Weber PLTW EDD Fall 2009.
Chapter 8: Regression Analysis PowerPoint Slides Prepared By: Alan Olinsky Bryant University Management Science: The Art of Modeling with Spreadsheets,
1 1 Slide Simple Linear Regression Part A n Simple Linear Regression Model n Least Squares Method n Coefficient of Determination n Model Assumptions n.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Ch4 Describing Relationships Between Variables. Pressure.
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc. Chap 12-1 Correlation and Regression.
Applied Quantitative Analysis and Practices LECTURE#23 By Dr. Osman Sadiq Paracha.
Ch4 Describing Relationships Between Variables. Section 4.1: Fitting a Line by Least Squares Often we want to fit a straight line to data. For example.
Statistical Methods Statistical Methods Descriptive Inferential
Regression. Population Covariance and Correlation.
Scatterplot and trendline. Scatterplot Scatterplot explores the relationship between two quantitative variables. Example:
Regression Regression relationship = trend + scatter
Simple Linear Regression. The term linear regression implies that  Y|x is linearly related to x by the population regression equation  Y|x =  +  x.
Linear Trend Lines = b 0 + b 1 X t Where is the dependent variable being forecasted X t is the independent variable being used to explain Y. In Linear.
Trend Projection Model b0b0 b1b1 YiYi
Simple & Multiple Regression 1: Simple Regression - Prediction models 1.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 13-1 Introduction to Regression Analysis Regression analysis is used.
Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Correlation Coefficient -used as a measure of correlation between 2 variables -the closer observed values are to the most probable values, the more definite.
Ch14: Linear Least Squares 14.1: INTRO: Fitting a pth-order polynomial will require finding (p+1) coefficients from the data. Thus, a straight line (p=1)
?v=cqj5Qvxd5MO Linear and Quadratic Functions and Modeling.
9.2 Linear Regression Key Concepts: –Residuals –Least Squares Criterion –Regression Line –Using a Regression Equation to Make Predictions.
Regression. Outline of Today’s Discussion 1.Coefficient of Determination 2.Regression Analysis: Introduction 3.Regression Analysis: SPSS 4.Regression.
Regression Analysis in Microsoft Excel MS&T Physics 1135 and 2135 Labs.
V. Rouillard  Introduction to measurement and statistical analysis CURVE FITTING In graphical form, drawing a line (curve) of best fit through.
Lecture 10 Introduction to Linear Regression and Correlation Analysis.
Error Analysis, Statistics, Graphing and Excel Necessary skills for Chem V01BL.
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Linear Regression. Regression Consider the following 10 data pairs comparing the yield of an experiment to the temperature at which the experiment was.
Bivariate Regression. Bivariate Regression analyzes the relationship between two variables. Bivariate Regression analyzes the relationship between two.
Fitting Equations to Data Chapter 7. Problems Classwork: 7.1, 7.8, 7.13, 7.22 Homework: 7.2, 7.9, 7.16, 7.23, 7.28.
The simple linear regression model and parameter estimation
Chapter 4: Basic Estimation Techniques
Regression and Correlation of Data Summary
Fitting Equations to Data
Regression Analysis AGEC 784.
Practice. Practice Practice Practice Practice r = X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N = 4 (4) 72.
The Simple Linear Regression Model: Specification and Estimation
Ch12.1 Simple Linear Regression
1) A residual: a) is the amount of variation explained by the LSRL of y on x b) is how much an observed y-value differs from a predicted y-value c) predicts.
Multivariate Analysis Regression
Ch 4.1 & 4.2 Two dimensions concept
Lesson 2.2 Linear Regression.
Presentation transcript:

1 4. Curve fitting On many occasions one has sets of ordered pairs of data (x 1,...,x n, y 1,...,y n ) which are related by a concrete function Y(X) e.g. some experimental data with a theoretical prediction  suppose Y(X) is a linear function - Excel offers various ways to determine alpha and beta SLOPE(y 1,...,y n,x1,,x1,...,x n, )  alpha INTERCEPT(y 1,...,y n,x1,,x1,...,x n, )  beta i) SLOPE, INTERCEPT - functions based on the method of least square

2 - How does Excel compute this? (see other courses for derivation) · mean values: · slope: · intercept: · regression coefficient: A good linear correlation between the xi xi and yi yi -values is r  1. With VBA we can write a code which does the same job, see Lab-session 4 of Part II.

3 LINEST(y 1,...,y n,x1,,x1,...,x n, constant,statistics) ii) LINEST - function this function is more sophisticated than the previous ones - if constant = TRUE or omitted the intercept is computed otherwise it is zero - if statistics = TRUE the function returns regression statistic values with the output: slope intercept standard error in the slope standard error in the intercept r-squared standard error in the y estimation - we restrict ourselves here to

4 - notice that LINEST is an array function, such that you have to prepare for an output bigger than one cell: · select a range for the output, e.g. 2  3 cells · type the function, e.g. =LINEST(.....) · complete with + + CtrlShiftEnter In the example we did =linest(B1:B10;A1:A10;true;true) slope intercept r-squared The value of r^2 is slightly away from 1, which shows that the points do not really fall into a line!

iii) adding a trendline. First we need to have a set of points that we want to plot. Type the coordinates of the points that you want to plot. For example, the y- values in column B and the x-values in column A, as in the example before. · Select the range containg the values you just entered and choose an XY-chart (Scatter) with the subtype which has no line joining the points 5

6 · right click on any of the plotted points  Add Trendline window opens · select the type of correlation, e.g. Linear, polynomial,... · in Options decide if you want to add the computed equation or the r^2 value on the chart

7 Example: Consider the data: slope  intercept  -4,4933 assume linear correlation: looks more or less linear? with trendline adding

8 Compute the residuals, i.e. (the predicted values - the given ones): ( xi xi ) - y i  not random! quadratic fit is better!

A simple VBA code that generates a set of points (x i, f(x i )) A1 is the active cell The loop generates 11 pairs of points (xi, f(xi)) and writes them in columns 0 (A) and 1 (B) When we run this code we obtain: 9

We can now plot the function as before: 10