Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?

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

The Maximum Likelihood Method
Linear Equations Review. Find the slope and y intercept: y + x = -1.
Correlation and regression
Statistical Techniques I EXST7005 Simple Linear Regression.
Data Modeling and Parameter Estimation Nov 9, 2005 PSCI 702.
Developing and Using a Simple Regression Equation. The simple regression model is based on the equation for a straight line: Yc = A+BX.
P M V Subbarao Professor Mechanical Engineering Department
Intro to Linear Methods Reading: DH&S, Ch 5.{1-4,8} hip to be hyperplanar...
GG 313 Geological Data Analysis # 18 On Kilo Moana at sea October 25, 2005 Orthogonal Regression: Major axis and RMA Regression.
Ch 6.2: Solution of Initial Value Problems
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Week Lecture 3Slide #1 Minimizing e 2 : Deriving OLS Estimators The problem Deriving b 0 Deriving b 1 Interpreting b 0 and b 1.
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
Notes on Weighted Least Squares Straight line Fit Passing Through The Origin Amarjeet Bhullar November 14, 2008.
Calibration & Curve Fitting
Objectives of Multiple Regression
Least-Squares Regression
Stat13-lecture 25 regression (continued, SE, t and chi-square) Simple linear regression model: Y=  0 +  1 X +  Assumption :  is normal with mean 0.
880.P20 Winter 2006 Richard Kass 1 Maximum Likelihood Method (MLM) Does this procedure make sense? The MLM answers this question and provides a method.
R. Kass/W03P416/Lecture 7 1 Lecture 7 Some Advanced Topics using Propagation of Errors and Least Squares Fitting Error on the mean (review from Lecture.
Fitting a line to N data points – 1 If we use then a, b are not independent. To make a, b independent, compute: Then use: Intercept = optimally weighted.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Chapter 8 Curve Fitting.
Curve-Fitting Regression
GG 313 Geological Data Analysis Lecture 13 Solution of Simultaneous Equations October 4, 2005.
Simple Linear Regression. The term linear regression implies that  Y|x is linearly related to x by the population regression equation  Y|x =  +  x.
Correlation and Regression Basic Concepts. An Example We can hypothesize that the value of a house increases as its size increases. Said differently,
Summary Part 1 Measured Value = True Value + Errors = True Value + Errors Errors = Random Errors + Systematic Errors How to minimize RE and SE: (a)RE –
Day 5 Objective – Students should be able to: Find the y intercept when given the slope and a point on the line.
. 5.1 write linear equation in slope intercept form..5.2 use linear equations in slope –intercept form..5.3 write linear equation in point slope form..5.4.
MAT 2401 Linear Algebra 2.5 Applications of Matrix Operations
Linear Regression Line of Best Fit. Gradient = Intercept =
OLS Regression What is it? Closely allied with correlation – interested in the strength of the linear relationship between two variables One variable is.
R. Kass/W03 P416 Lecture 5 l Suppose we are trying to measure the true value of some quantity (x T ). u We make repeated measurements of this quantity.
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
HANDS ON MATHEMATICS FOR INFORMATICS PRESENTED BY NOREEN NASAR M.SARMAD HUSSAIN.
Chapter 4 – Graphing Linear Equations and Functions Algebra I A - Meeting 24 Vertical Change Slope – is the ratio of the vertical change to the horizontal.
Copyright © Cengage Learning. All rights reserved. 8 9 Correlation and Regression.
Correlation and Regression Basic Concepts. An Example We can hypothesize that the value of a house increases as its size increases. Said differently,
R. Kass/Sp07P416/Lecture 71 More on Least Squares Fit (LSQF) In Lec 5, we discussed how we can fit our data points to a linear function (straight line)
Data Modeling Patrice Koehl Department of Biological Sciences
Copyright © Cengage Learning. All rights reserved.
Notes on Weighted Least Squares Straight line Fit Passing Through The Origin Amarjeet Bhullar November 14, 2008.
The Maximum Likelihood Method
The Computational Method (mathematics)
Physics 114: Lecture 13 Probability Tests & Linear Fitting
REGRESSION G&W p
Part 5 - Chapter
Part 5 - Chapter 17.
Practice. Practice Practice Practice Practice r = X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N = 4 (4) 72.
The Maximum Likelihood Method
SLOPES Essential Question: How do we relate the concept of slope as rate of change and how do we determine slopes from graphs, tables and algebraic representations?
#2 Review of Writing Linear Equation
Simple Linear Regression - Introduction
The Maximum Likelihood Method
Part 5 - Chapter 17.
Physics 114: Lecture 14 Linear Fitting
Chi Square Distribution (c2) and Least Squares Fitting
Linear regression Fitting a straight line to observations.
Nonlinear regression.
Warm Up -2(x - 1) -3(x + 5) 4(x - 2)
JEOPARDY Algebra 1 EOC Review.
2-4: Writing Linear Equations Using Slope Intercept Form
Slope-Point Form of the Equation for a Linear Function
Slope-intercept Form of Equations of Straight Lines
ALGEBRA I - REVIEW FOR TEST 2-1
Slope Intercept Form Algebra 1 Unit 4 Lesson 2.
Presentation transcript:

Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?

Linear Fits So far, in order to do a linear fit, we have used the solver to find the values of m and b that minimize chi^2 When the theory has only a linear dependence on its parameters, then the minimum in  2 can be determined analytically. This is why it’s very nice to put data into a form where it can be described by a theory that depends linearly on its parameters. e.g., any polynomial function such as y th = A + Bx + Cx 2 + … is linear in the parameters (A,B,C,…). So let’s minimize c 2 for a simple polynomial: a straight line theory. Using this analytically expression, its also straight-forward to derive an analytical expression for the errors on the slope and intercept.

Minimizing  2 Suppose we have data (x i, y i,  i ) and we want to fit the data to a line: y = A + Bx. First we calculate  2 : Then we minimize it with respect to the parameters of the theory, A and B. To find the best values of both A and B, we need to carry out this minimization simultaneously. So we take the partial derivative of  2 w.r.t. A and B, and set them both to 0 simultaneously.

Minimizing  2, cont’d. Here are our two equations, rearranged. Note that all the quantities in parentheses can be computed directly from our data, so they are just numbers. Using linear algebra or matrix techniques, it is simple to invert these equations to find A and B. I won’t do it here, but will just write the answer. The answer is:

Error on Slope and Intercept Our calculated value for A and B depend on the measured values x_i, y_i. We can therefore get the errors on A and B by using the standard propagation of errors formula on our formulas for these quantities. Let’s do this for the intercept. The derivation for the error on the slope is parallel. Let’s also just do this for the simple case when the errors on x are small (negligible) and the errors on the y’s are all the same (sigma_i -> sigma)

Error on Intercept Does not depend on y_i. If ignoring errors on x_i, this is just a constant When sigma_i -> sigma

Error on Intercept If the sigma_i’s are all the same (sigma), this becomes

Error on intercept 

Error on Intercept Look in your linear fitter spread sheet and you’ll see this linked to the error on intercept sheet