lecture20 - Lecture 20 Least Squares Fitting Noisy Data...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 20 Least Squares Fitting: Noisy Data Very often data has a significant amount of noise. The least squares approximation is intentionally well-suited to represent noisy data. The next illustration shows the effects noise can have and how least squares is used. Traffic flow model Suppose you are interested in the time it takes to travel on a certain section of highway for the sake of planning. According to theory, assuming up to a moderate amount of traffic, the time should be approximately: T ( x ) = ax + b where b is the travel time when there is no other traffic, and x is the current number of cars on the road (in hundreds). To determine the coefficients a and b you could run several experiments which consist of driving the highway at different times of day and also estimating the number of cars on the road using a counter. Of course both of these measurements will contain noise , i.e. random fluctuations. We could simulate such data in Matlab as follows: > x = 1:.1:6; > T = .1*x + 1; > Tn = T + .1*randn(size(x)); > plot(x,Tn,.) The data should look like it lies on a line, but with noise. Click on the Tools button and choose Basic fitting . Then choose a linear fit. The resulting line should go through the data in what looks like a very reasonable way. Click on show equations . Compare the equation with T ( x ) = . 1 x + 1. The coefficients should be pretty close considering the amount of noise in the plot. Next, try to fit the data with a spline. The result should be ugly. We can see from this example that splines are not suited to noisy data . How does Matlab obtain a very nice line to approximate noisy data? The answer is a very standard numerical/statistical method known as least squares ....
View Full Document

This note was uploaded on 02/09/2012 for the course MATH 344 taught by Professor Young,t during the Fall '08 term at Ohio University- Athens.

Page1 / 3

lecture20 - Lecture 20 Least Squares Fitting Noisy Data...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online