Chapter 15 Modeling of Data. Statistics of Data Mean (or average): Variance: Median: a value x j such that half of the data are bigger than it, and half.

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

1 Regression as Moment Structure. 2 Regression Equation Y =  X + v Observable Variables Y z = X Moment matrix  YY  YX  =  YX  XX Moment structure.
The Simple Regression Model
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Chapter 10 Curve Fitting and Regression Analysis
Linear regression models
Ch11 Curve Fitting Dr. Deshi Ye
The General Linear Model. The Simple Linear Model Linear Regression.
Simple Linear Regression
Data mining and statistical learning - lecture 6
Variance and covariance M contains the mean Sums of squares General additive models.
The Simple Linear Regression Model: Specification and Estimation
G. Cowan Lectures on Statistical Data Analysis 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem, random variables, pdfs 2Functions.
Some useful linear algebra. Linearly independent vectors span(V): span of vector space V is all linear combinations of vectors v i, i.e.
Curve-Fitting Regression
Lecture 7 Advanced Topics in Least Squares. the multivariate normal distribution for data, d p(d) = (2  ) -N/2 |C d | -1/2 exp{ -1/2 (d-d) T C d -1 (d-d)
Part 4 Chapter 13 Linear Regression
7. Least squares 7.1 Method of least squares K. Desch – Statistical methods of data analysis SS10 Another important method to estimate parameters Connection.
Ordinary least squares regression (OLS)
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Linear and generalised linear models
Linear and generalised linear models
Basics of regression analysis
Objectives of Multiple Regression
Regression and Correlation Methods Judy Zhong Ph.D.
Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
3.1 Ch. 3 Simple Linear Regression 1.To estimate relationships among economic variables, such as y = f(x) or c = f(i) 2.To test hypotheses about these.
LINEAR REGRESSION Introduction Section 0 Lecture 1 Slide 1 Lecture 5 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall.
Regression Analysis (2)
Stat13-lecture 25 regression (continued, SE, t and chi-square) Simple linear regression model: Y=  0 +  1 X +  Assumption :  is normal with mean 0.
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 2010 Error analysis Statistics Regression Experimental methods E EXM8.
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.
Chapter 12 Multiple Linear Regression Doing it with more variables! More is better. Chapter 12A.
Physics 114: Exam 2 Review Lectures 11-16
Linear Regression Andy Jacobson July 2006 Statistical Anecdotes: Do hospitals make you sick? Student’s story Etymology of “regression”
ES 240: Scientific and Engineering Computation. Chapter 13: Linear Regression 13. 1: Statistical Review Uchechukwu Ofoegbu Temple University.
SUPA Advanced Data Analysis Course, Jan 6th – 7th 2009 Advanced Data Analysis for the Physical Sciences Dr Martin Hendry Dept of Physics and Astronomy.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Learning Theory Reza Shadmehr LMS with Newton-Raphson, weighted least squares, choice of loss function.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Data Modeling Patrice Koehl Department of Biological Sciences National University of Singapore
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)
Review of fundamental 1 Data mining in 1D: curve fitting by LLS Approximation-generalization tradeoff First homework assignment.
Economics 173 Business Statistics Lecture 10 Fall, 2001 Professor J. Petry
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.
Machine Learning 5. Parametric Methods.
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.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
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.
Numerical Analysis – Data Fitting Hanyang University Jong-Il Park.
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,
Environmental Data Analysis with MatLab 2 nd Edition Lecture 22: Linear Approximations and Non Linear Least Squares.
Linear Regression Hypothesis testing and Estimation.
The “Big Picture” (from Heath 1995). Simple Linear Regression.
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)
Colorado Center for Astrodynamics Research The University of Colorado 1 STATISTICAL ORBIT DETERMINATION Statistical Interpretation of Least Squares ASEN.
The simple linear regression model and parameter estimation
Part 5 - Chapter
CH 5: Multivariate Methods
Simple Linear Regression - Introduction
Chapter 12 Curve Fitting : Fitting a Straight Line Gab-Byung Chae
Modelling data and curve fitting
Linear regression Fitting a straight line to observations.
Simple Linear Regression
Learning Theory Reza Shadmehr
Mathematical Foundations of BME
Presentation transcript:

Chapter 15 Modeling of Data

Statistics of Data Mean (or average): Variance: Median: a value x j such that half of the data are bigger than it, and half of data smaller than it. σ is called standard deviation.

Higher Moments

Gaussian Distribution

Least Squares Given N data points (x i,y i ), i = 1, …, N, find the fitting parameters a j, j = 1, 2, …, M of the function f(x) = y(x; a 1,a 2,…,a M ) such that is minimized over the parameters a j.

Why Least Squares Given the parameters, what is the probability that the observed data occurred? Assuming independent, Gaussian distribution, that is:

Chi-Square Fitting Minimize the quantity: If each term is an independent Gaussian,  2 follows so-called  2 distribution. Given the value  2 above, we can compute Q = Prob(random variable chi 2 >  2 ) If Q.999, the model may be rejected.

Meaning of Goodness-of-Fit Q 22 Observed value of  2 Area = Q If the statistic  2 indeed follows this distribution, the probability that chi- square value is the currently computed value  2, or greater, equals the hashed area Q. It is quite unlikely if Q is very small or very close to 1. If so, we reject the model. Number of degrees of freedom = N – M. 0

Fitting to Straight Line (with known error bars) x y fitting to y=a+bx Given (x i, y i ±σ i ) Find interception a and slope b such that the chi-square merit function is minimized. Goodness-of-fit is Q=gammq((N-2)/2,  2 /2). If Q > 0.1, the fitting is good, if Q ≈ 0.001, may be OK, but if Q < 0.001, fitting is questionable. If Q > 0.999, fitting is too good to be true.

Linear Regression Model x y fitting to y=a+bx ε Data do not follow exactly the straight line. The basic assumption in linear regression (least squares fit) is that the deviations ε are independent gaussian random noise. Error in y, but no error in x.

Solution of Straight Line Fit

Error Propagation Let z = f(y 1,y 2,…,y N ) be a function of independent random variables y i. Assuming the variances are small, we have Variance of z is related to variances of y i by

Error Estimates on a and b Using error propagation formula, viewing a as a function of y i, we have Thus Similarly

What if error in y i is unknown? The goodness-of-fit Q can no longer be computed Assuming all data have same σ: Error in a and b can still be estimated, using σ i =σ (but less reliably) M is number of basis functions, M=2 for straight line fit.

General Linear Least-Squares Fit to a linear combination of arbitrary functions: E.g., polynomial fit X k (x)=x k-1, or harmonic series X k (x)=sin(kx), etc The basis functions X k (x) can be nonlinear

Merit Function & Design Matrix Find a k that minimize Define The problem can be stated as Let a be a column vector:

Normal Equation & Covariance The solution to min ||b-Aa|| is A T Aa=A T b Let C = (A T A) -1, then a = CA T b We can view data y i as a random variable due to random error, y i =y(x)+ε i. =0, =σ i 2  ij. Thus a is also a random variable. Covariance of a is precisely C - = C Estimate of the fitting coefficient is

Singular Value Decomposition We can factor arbitrary complex matrix as A = UΣV † NMNMNNNN NMNM MMMM U and V are unitary, i.e., UU † =1, VV † =1 Σ is diagonal (but need not square), real and positive, w j ≥ 0.

Solve Least-Squares by SVD From normal equation, we have Or Omitting terms with very small w gives robust method.

Nonlinear Models y=y(x; a)  2 is a nonlinear function of a. Close to minimum, we have (Taylor expansion)

Solution Methods Know gradient only, Steepest descent: Know both gradient and Hessian matrix: Define

Levenberg-Marquardt Method Smoothly interpolate between the two methods by a control parameter. =0, use more precise Hessian; very large, use steepest descent. Define new matrix A’ with elements:

Levenberg-Marquardt Algorithm Start with an initial guess of a Compute  2 (a) Pick a modest value for, say =0.001 (†) Solve A’  a=β, evaluate  2 (a+  a) If  2 increase, increase by a factor of 10 and go back to (†) If  2 decrease, decrease by a factor of 10, update a  a+  a, and go back to (†)

Problem Set 9 1.If we use the basis {1, x, x + 2} for a linear least-squares fit using normal equation method, do we encounter problem? Why? How about SVD? 2.What happen if we apply the Levenberg- Marquardt method for a linear least- square problem?