1 CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing the objective function CH8: Theoretical.

Slides:



Advertisements
Similar presentations
Design of Experiments Lecture I
Advertisements

Example 2.2 Estimating the Relationship between Price and Demand.
Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)
Linear Regression.
Wyndor Example; Enter data Organize the data for the model on the spreadsheet. Type in the coefficients of the constraints and the objective function.
McGraw-Hill/Irwin ©2008 The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T4 PROBLEM SOLVING USING EXCEL Goal Seek, Solver & Pivot Tables.
Tutorial 10: Performing What-If Analyses
FTP Biostatistics II Model parameter estimations: Confronting models with measurements.
TRIM Workshop Arco van Strien Wildlife statistics Statistics Netherlands (CBS)
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
1 BIS APPLICATION MANAGEMENT INFORMATION SYSTEM Planning modeling Chapter outline: 1.The basic planning problem 2.The basic pricing problem 3.Nonlinear.
Example 14.3 Football Production at the Pigskin Company
SPF workshop February 2014, UBCO1 CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing.
Using Excel Solver for Linear Optimization Problems
Section 4.2 Fitting Curves and Surfaces by Least Squares.
Chap 3-1 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 3 Describing Data: Numerical.
Formula Auditing, Data Validation, and Complex Problem Solving
Computational Methods for Management and Economics Carla Gomes Module 4 Displaying and Solving LP Models on a Spreadsheet.
Data Tutorial Tutorial on Types of Graphs Used for Data Analysis, Along with How to Enter Them in MS Excel Carryn Bellomo University of Nevada, Las Vegas.
Chap 3-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 3 Describing Data: Numerical Statistics for Business and Economics.
Spreadsheet Problem Solving
Non-Linear Simultaneous Equations
COMPREHENSIVE Excel Tutorial 10 Performing What-If Analyses.
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
START EXCEL BUILD OR RETRIEVE YOUR OPTIMIZATION MODEL SAVE YOUR WORKBOOK!! CHOOSE “Solver…” IN THE “Tools” MENU SPECIFY IN SOLVER DIALOG BOX: 1.CELL TO.
Computer Literacy BASICS
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 3-1 Chapter 3 Numerical Descriptive Measures Statistics for Managers.
EC339: Lecture 6 Chapter 5: Interpreting OLS Regression.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
Spreadsheets in Finance and Forecasting Presentation 8: Problem Solving.
Spreadsheet Modeling of Linear Programming (LP). Spreadsheet Modeling There is no exact one way to develop an LP spreadsheet model. We will work through.
CPE 619 Simple Linear Regression Models Aleksandar Milenković The LaCASA Laboratory Electrical and Computer Engineering Department The University of Alabama.
Simple Linear Regression Models
SLR w SI = Simple Linear Regression with Seasonality Indices
Chapter 1 Introduction to VBA Development in Excel.
CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing the objective function CH8: Theoretical.
Lecture 12 Statistical Inference (Estimation) Point and Interval estimation By Aziza Munir.
We can make Product1 and Product2. There are 3 resources; Resource1, Resource2, Resource3. Product1 needs one hour of Resource1, nothing of Resource2,
1 Chapter 4 Planning Models Operations Analysis Using MS Excel.
Variation This presentation should be read by students at home to be able to solve problems.
1 Analyzing Data Using Goal Seek & Solver Applications of Spreadsheets.
1 7. What to Optimize? In this session: 1.Can one do better by optimizing something else? 2.Likelihood, not LS? 3.Using a handful of likelihood functions.
SPF workshop February 2014, UBCO1 CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing.
1 CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first parametric SPF CH6: Which fit is fitter CH7: Choosing the objective function.
Animal Shelter Activity 2.
DAY 9: MICROSOFT EXCEL – CHAPTER 6 Sravanthi Lakkimsetty Sept 16, 2015.
Chapter 7 Nonlinear Optimization Models. Introduction The objective and/or the constraints are nonlinear functions of the decision variables. Select GRG.
SPF workshop UBCO February CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing.
Regression Analysis in Microsoft Excel MS&T Physics 1135 and 2135 Labs.
INTEGRALS We saw in Section 5.1 that a limit of the form arises when we compute an area. We also saw that it arises when we try to find the distance traveled.
EXCEL DECISION MAKING TOOLS AND CHARTS BASIC FORMULAE - REGRESSION - GOAL SEEK - SOLVER.
Statistical Methods © 2004 Prentice-Hall, Inc. Week 3-1 Week 3 Numerical Descriptive Measures Statistical Methods.
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
Excel Solver Tutorial BI&A 674.
A BRIEF INTRODUCTION TO THE WUFFDA PROGRAM
Excel Tutorial 8 Developing an Excel Application
Solver & Optimization Problems
Excel Solver IE 469 Spring 2017.
Microsoft Office Illustrated
Excel Solver IE 469 Spring 2018.
Wyndor Example; Enter data
Introduction to linear programming (LP): Minimization
Navya Thum February 13, 2013 Day 7: MICROSOFT EXCEL Navya Thum February 13, 2013.
Excel Solver IE 469 Fall 2018.
REACH Computer Resource Center
HIMS 650 Homework set 5 Putting it all together
Excel Solver IE 469 Spring 2019.
BUS-221 Quantitative Methods
Presentation transcript:

1 CH1. What is what CH2. A simple SPF CH3. EDA CH4. Curve fitting CH5. A first SPF CH6: Which fit is fitter CH7: Choosing the objective function CH8: Theoretical stuff Ch9: Adding variables CH10. Choosing a model equation 4. Curve Fitting: Tools and First Steps EDA : Is the trait ‘safety-related’ and, If yes, what function might represent it. Obvious observations In this session: Why is Curve-Fitting necessary. The costs of C-F. How to do non-parametric C-F. The ‘Solver’. How to use it for parametric C-F. SPF workshop February 2014, UBCO

2 The Data The Curve-Fitting Machine The SPF The Modeller C-F Elements

3 Why is C-F necessary? Data are sparse Few observations → bad estimates →bad decisions →poor use of money SPF workshop February 2014, UBCO

1.Even with rich data there are many cells where data is insufficient 2.The safety of units depends on many traits 3.The addition of every trait further decimates the number of observations in a cell. The “sparse-data problem”. Where can Curve Fitting help? 4

The goal of curve-fitting is:...to the create an SPF that provides good E{  } and  = f(Traits, parameters) Applications centered perspective Here the question is: “How to do modeling to get good estimates of E{  } and  ? Recall: 5SPF workshop February 2014, UBCO

Many think that he goal of C-F to produce good CMFs Is such a goal is achievable? Chapter 5 E{  } and  = f(Traits, parameters ) Cause and effect centered perspective Here the question is:” How to do modeling to get the right ‘f’ and parameters so that I can compute the change in E{  } caused by a change in a trait. Recall: 6

7 Under the data cloud there is an ‘orderly’ relationships A loose definition: Relationship is orderly if fitting some curve to data points seems sensible The belief on which all C-F is founded: SPF workshop February 2014, UBCO

8 If ‘orderly’ then what is observed in one cell contains information about the neighbouring cell. Therefore, estimate for one cell =f(Data in other cells) What can we do if ‘orderly’? 1234 AADT No. of Segments Accidents/ segment SPF ordinate Five-point running average … … 11.20=( … )/5.

SPF workshop February 2014, UBCO9 Two Kinds of C-F Non-parametricParametric Specify rule how to compute local estimate from nearby data. Product: Table & graph Specify variables, parameters, & function. Estimate parameters. Product: Model Equation Example of rule: Compute the running average of 9 observed values Example of model equation:

10 No free lunch (the price) There is something different about this bin but 1’ ignores it Same here This kink in the curve is due to 1 Judging by the bars the squares are accurate. Is the curve really better? Non-parametric 5 point moving average Parametric: All the above +

11 Open Spreadsheet #3. ‘N-W non-parametric C-F’ on the ‘N-W Smoothing’ worksheet The data Click on Command button, Play. Is there a curve under the cloud?

SPF workshop February 2014, UBCO12 Non-parametric C-F Can bring out order even where non is discernible.

SPF workshop February 2014, UBCO13 Overfitting in a nutshell The 500 curve fits the data better than the 1000 one. Which curve is better? The smaller the bandwidth the better will be ‘goodness-of-fit’ statistics. Conclusion: Better GOF statistic is not necessarily a better fit!

14 But, sparse data problem persist! When Segment Length is added Conclusion: Can be of use in EDA or with 1-2 traits; not more.

SPF workshop February 2014, UBCO15 Since the safety of units depends on more than one or two traits one cannot avoid making assumptions One has to flesh out a ‘model equation’: What traits (variables) should be in the model equation; How these should combine into an equation; Variables & equation make the skeleton. What should be the values of the parameters; Parameters stretch the skeleton to fit the data. This always requires minimization or maximization Next Going the next step

SPF workshop February 2014, UBCO16 Preparing the optimization tool for parametric C-F: The ‘Excel Solver’ Before first use ‘reference’ it. Go to ‘Developer’. On ‘Code’ tab go to ‘Visual Basic’. Click on ‘Tools’, select ‘References’, check ‘Solver’ box. OK

SPF workshop February 2014, UBCO17 Using ‘Solver’ to find peaks and valleys: Illustration Prepare spreadsheet for finding max or min: 1.Put an initial guess in A2, 2.Place formula in B2 Open spreadsheet #4: How to use the ‘Solver’

SPF workshop February 2014, UBCO18 1. Click on ‘Data’ 2. Click on ‘Solver’ 3. Window opens

SPF workshop February 2014, UBCO19 1. ‘y’ in B2 is to be minimized or maximized. 2. You want to find Max or Min? 3. You want to find it by changing the ‘x’ in A2 4. Click

How the ‘Solver’ works: 1.It begins the search from the initial guess (0.3 in A2); 2.If ‘min’ it computes the largest downhill slope; 3.It selects a step size and takes it; 4.It repeats 1, 2 and 3 till the ‘largest slope’ is close to 0. 20SPF workshop February 2014, UBCO

21 Solver’s main limitation: If the initial guess is at ‘1’ it can find ‘Max’ at ‘3’ and ‘Min’ at ‘2’ but it cannot find the ‘Min’ at ‘4’! Conclusion: It finds ‘local’, not ‘global’ extrema. Now, with same initial guess, find maximum. (Result: x=0.070, y=0.343) Now try to find the other valley. Choose initial guess to the left of the peak, say (Min & Solve)

22 What went wrong? Solver decided to take a step downhill all the way to x= But here value cannot be calculated. This kind of problem arises when one tries to divide by 0, take a log of a negative number, etc. To guard against it: Use constraints. Click ‘Add’

If you now click on ‘Solve’ OK Another possible snag: Solver is asked to find values that differ by factors of 1000 or more More later 23

24 Finding global optima for non-convex functions is difficult. This is why some software packages restrict you in the choice of the objective function (e.g. to Generalized Linear Models). There is no such restriction in the spreadsheet C-F. However, one has to be careful in choosing the initial guess. SPF workshop February 2014, UBCO

25 How to use the solver for curve-fitting (C-F). When doing the simple SPF based on bins we had: Task: Fit a curve to these points by weighted least squares Open spreadsheet #5: Fitting a curve to  on ‘Data’ workpage.

Go to the ‘Initial guess’ worksheet Initial guesses Play with the initial guesses to fit the curve to data 26SPF workshop February 2014, UBCO

27 376/2729=0.138 E4*(C4-D4)^ 2 To be minimized Play with the initial guesses to minimize weighted sum of SD Go to the ‘Use Solver’ worksheet

SPF workshop February 2014, UBCO28 Now use ‘Solver’

SPF workshop February 2014, UBCO29 The fitted curve

SPF workshop February 2014, UBCO30 1.Choose the function to be fitted. (Here it was α(AADT) β ) 2.Input into a range of cells that can be later conveniently (contiguously) selected some good initial guesses for the parameters. 3.Input the formula that computes the fitted values. 4.Decide on the criterion by which to judge the goodness of a fit. (Here it was the sum of weighted squared differences). 5.Use the ‘Solver’ to find the parameters which make for the best fit. We now have the tool needed for parametric C-F The main steps:

Parametric Curve Fitting - overview 1.Which variables should be in the model equation; 2.In what manner should they combine; 3.What should be the value of the parameters. 31

SPF workshop February 2014, UBCO32 The difficulties: 1.What surface (function)? The regularity is difficult to visualize, confounding is a problem; 2.No theory, few features known by logic. All else is possible; 3.We know that important variables are missing from the model equation making the variables in the model into proxies; 4.Variables in the model are inaccurate and averaged. 5.Smoothing always distorts; 6.Parametric smoothing is a straightjacket

SPF workshop February 2014, UBCO33 Summary for section 4. 1.The goal of C-F is to ensure good fit to data. 2.There are two types of C-F, (a) non-parametric and (b) parametric. 3.For (a) we need a computation rule, for (b) a model equation & estimated parameters. Both rely on existence of ‘orderly relationship’. 4.The belief in orderly relationship allows us to use data from one bin for estimation in a different bin and thereby solves the ‘sparse data problem’. 5.But there s no free lunch.

SPF workshop February 2014, UBCO34 6.Non-parametric fits work well with one or two traits. 7.The Excel solver was introduced and its uses illustrated. Valdimir Kush: Arrow of time