Spreadsheet Problem Solving

Slides:



Advertisements
Similar presentations
Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)
Advertisements

Applied Econometrics Second edition
Polynomial Regression and Transformations STA 671 Summer 2008.
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
Guide to Using Excel For Basic Statistical Applications To Accompany Business Statistics: A Decision Making Approach, 5th Ed. Chapter 15: Analyzing and.
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
Regression Regression: Mathematical method for determining the best equation that reproduces a data set Linear Regression: Regression method applied with.
Statistics for Managers Using Microsoft® Excel 5th Edition
Statistics: Data Analysis and Presentation Fr Clinic II.
Chapter 12a Simple Linear Regression
First-Year Engineering Program 1 Autumn 2009 Graphing with Microsoft Excel Lecture 11 Engineering H191 Engineering Fundamentals and Laboratory.
Examining Relationship of Variables  Response (dependent) variable - measures the outcome of a study.  Explanatory (Independent) variable - explains.
RESEARCH STATISTICS Jobayer Hossain Larry Holmes, Jr November 6, 2008 Examining Relationship of Variables.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 15-1 Chapter 15 Multiple Regression Model Building Basic Business Statistics 11 th Edition.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
BCOR 1020 Business Statistics Lecture 24 – April 17, 2008.
Stat 112: Lecture 16 Notes Finish Chapter 6: –Influential Points for Multiple Regression (Section 6.7) –Assessing the Independence Assumptions and Remedies.
Excel For MATH 125 Histograms. If you have Excel 2003…
Non-Linear Simultaneous Equations
Copyright ©2011 Pearson Education 15-1 Chapter 15 Multiple Regression Model Building Statistics for Managers using Microsoft Excel 6 th Global Edition.
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
DISCLAIMER This guide is meant to walk you through the physical process of graphing and regression in Excel…. not to describe when and why you might want.
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
Nonlinear Regression Functions
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
1 1 Slide © 2009 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
3 CHAPTER Cost Behavior 3-1.
Simple Linear Regression Models
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Bivariate Regression (Part 1) Chapter1212 Visual Displays and Correlation Analysis Bivariate Regression Regression Terminology Ordinary Least Squares Formulas.
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.
1 Chapter 10 Correlation and Regression 10.2 Correlation 10.3 Regression.
Chapter 10 Correlation and Regression
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.
Regression. Population Covariance and Correlation.
C opyright  2007 by Oxford University Press, Inc. PowerPoint Slides Prepared by Robert F. Brooker, Ph.D.Slide 1 1.
Chapter 4 Linear Regression 1. Introduction Managerial decisions are often based on the relationship between two or more variables. For example, after.
CTS130 Spreadsheet Lesson 19 Using What-If Analysis.
Trend Projection Model b0b0 b1b1 YiYi
June 21, Objectives  Enable the Data Analysis Add-In  Quickly calculate descriptive statistics using the Data Analysis Add-In  Create a histogram.
Graphical Analysis in Excel EGN 1006 – Introduction to Engineering.
1 Quadratic Model In order to account for curvature in the relationship between an explanatory and a response variable, one often adds the square of the.
Example 13.2 Quarterly Sales of Johnson & Johnson Regression-Based Trend Models.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 12.3.
Chapter 22: Building Multiple Regression Models Generalization of univariate linear regression models. One unit of data with a value of dependent variable.
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.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 14-1 Chapter 14 Multiple Regression Model Building Statistics for Managers.
EXCEL DECISION MAKING TOOLS BASIC FORMULAE - REGRESSION - GOAL SEEK - SOLVER.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license.
Data Analysis, Presentation, and Statistics
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 15-1 Chapter 15 Multiple Regression Model Building Basic Business Statistics 10 th Edition.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 14-1 Chapter 14 Multiple Regression Model Building Statistics for Managers.
Regression Analysis in Microsoft Excel MS&T Physics 1135 and 2135 Labs.
Lecture 8: Ordinary Least Squares Estimation BUEC 333 Summer 2009 Simon Woodcock.
EXCEL DECISION MAKING TOOLS AND CHARTS BASIC FORMULAE - REGRESSION - GOAL SEEK - SOLVER.
REGRESSION REVISITED. PATTERNS IN SCATTER PLOTS OR LINE GRAPHS Pattern Pattern Strength Strength Regression Line Regression Line Linear Linear y = mx.
Correlation and Regression Ch 4. Why Regression and Correlation We need to be able to analyze the relationship between two variables (up to now we have.
Linear Regression. Regression Consider the following 10 data pairs comparing the yield of an experiment to the temperature at which the experiment was.
The simple linear regression model and parameter estimation
Regression and Correlation of Data Summary
Excel - Data Analysis Dr. Theodore Cleveland University of Houston
Regression Analysis AGEC 784.
PowerPoint Slides Prepared by Robert F. Brooker, Ph.D. Slide 1
Principles and Worldwide Applications, 7th Edition
Multivariate Analysis Regression
Presentation transcript:

Spreadsheet Problem Solving fitting models to data straight-line regression multilinear regression nonlinear regression model building and selection using Data Analysis Regression tool Trendline Solver

Review of Straight-line Linear Regression [ from Class #6 ] x y y = ax + b y1 y11 e11 Model x11 For each data point, there is an error between that point and the model line. Fitting the model has to do with minimizing these errors.

Finding the model parameters that give the best fit For the straight-line model, the model parameters are the slope (a) and the intercept (b). The problem is then to find the values of a and b that give the best fit. What is meant by the best fit? The standard measure of goodness of fit is the sum of squares of the errors: So, the problem reduces to finding the minimum of SSE by adjusting a and b.

Fitting a straight-line model to data The minimization of SSE can be solved by calculus to give formulas for the best values of a and b: and Excel solves problems like this with either formulas or built-in tools (Data Analysis Regression & Trendline).

Example: straight-line fit

Transfer the data to an Excel spreadsheet and create a graph

Calculating the slope and intercept using Excel formulas

The formulas behind the numbers

Using the model straight-line equation to compute the predictions: and copy these to the graph, displaying as a straight line

Using an alternate, shortcut approach Trendline Start with a simple graph of the data Select the data series by clicking on it Right-click on a data point to get context-sensitive menu Select Add Trendline option

The Add Trendline dialog box Linear selected by default OK for this problem Click on Options tab

Options tab Set for Display equation on chart Click OK

Initial form of graph with straight-line added Fix up equation display

Looks just like before, but we got there quicker But neither of these approaches gives us much information about the model, how good it is, etc.

A 2nd alternate approach Data Analysis Regression tool Tools Data Analysis recall that, if Data Analysis does not appear on the Tools menu, you will need to check Analysis Toolpak in the Add-ins dialog box [if it’s not there, you will have to go back to Microsoft Office/Excel set-up] Initial, empty Regression dialog box

Regression dialog box set up for our problem checking Residuals will give us also model predictions

Initial (poorly formatted) Regression output display [ on new worksheet ] Format Autoformat OK and fix up display for appropriate significant figures

Final Display of Regression Output [ tons of info, most of which you will not understand for a couple years ] used to judge goodness of fit intercept and slope values used to judge whether terms “belong” in the model add to data graph for visual comparison with model

Judging Goodness of Fit correlation coefficient: if close to +1 or –1, indicates strong correlation between x and y [something we already know from the original graph!] coefficient of determination: %-age of the variability in y that’s accounted for by the model adjustment to R2 that penalizes the value for using a model with too many terms gives an idea of how far off the model predictions will be Adjusted R2 or Standard Error can be used to compare different models and choose which fits best. The higher the value of Adjusted R2 the better, the lower the value of Standard Error the better.

Judging whether terms belong in the model P-values estimate the probability that the true value of the coefficient could be zero P-values that are quite small, like these, indicate that there is little question about the significance of the term coefficients. In our case here, that means that both the intercept term and the slope term belong in the model. A P-value of 5% (0.05) or greater causes suspicion that the coefficient may not be significant and that the term should probably be dropped from the model

The Data Analysis Regression tool appears much more complicated and involved that the shortcut Trendline tool, so . . . Why use Data Analysis Regression? It provides more information that let’s us judge the goodness of fit and significance of model terms 2) It can handle model forms that cannot be handled by Trendline So, generally, when using Excel, we prefer the Data Analysis Regression tool over Trendline but Trendline is still quite good for “quick and dirty” looks at the data Learn to use both!

More complicated models Note: it is called linear regression, even when there are nonlinear terms in x, because the terms are linear in the model parameters, a, b, c, etc. More complicated models Polynomial models General linear models Examples: polynomial models above Multilinear models Examples:

Nonlinear models Transformable to linear Not transformable straight-line regression! We can use the Data Analysis Regression tool for everything except the nonlinear models that can’t be transformed into linear. For those, we can use the Solver.

Example: polynomial regression curvature evident

Setting up for polynomial fits Select for quadratic model, etc

Data Analysis Regression tool check Labels because headings are included in selections for Y and X check Residuals

Quadratic model regression results model performance adjR2 model coefficients copy to graph

Quadratic model really doesn’t “capture” behavior of data

Continue with fits of cubic, 4th- & 5th-order polynomials Summary of results Looks like 5th-order offers best performance but improvement is marginal over 4th-order. Resulting model:

Precautions on polynomial fitting Try to use the lowest-order model that gives a good fit. Higher-order models will have “wiggles” between data points that will cause prediction errors. In fact, an (n-1)th-order polynomial will provide a perfect fit to the n data points, but it will usually do bizarre things in between the data points.

Example: multi-linear regression Model 1: X-input range includes two independent variables: x1 and x2 High P value for intercept in Model 1 suggests Model 2 without intercept, but there is a significant loss in adjR2

Model performance isn’t that great for either model, and Model 1 doesn’t appear dramatically better than Model 2 Note: for multi-linear models, we plot Predicted vs Measured y. A perfect model would place points directly on the 45-degree line.

Nonlinear Regression Fitting the parameters of the van der Waals’ equation of state Data for SO2 Find the values of a and b that give the best predictions for P, when compared to the measured values of P

Strategy for Nonlinear Regression 1) estimate initial values for a and b 2) compute predicted P’s using data for and T 3) compute errors between predicted P’s and measured P’s 4) sum the squares of these errors to compute SSE 5) have the Solver minimize SSE by adjusting the values of a and b

- Basic data Calculated Pressure by both ideal gas law and van der Waals Sum of squares of this column -

van der Waals Calculation Ideal Gas Calculation Sum of Squares Calculation van der Waals Calculation Error Calculation

Setting up Solver Parameters SSE as Target Cell Minimize by adjusting a and b with b>=0 constraint Results

Results

Note departure of ideal gas predictions at higher pressures