Geoscience Reference
In-Depth Information
Fig. 4.5 h e result of linear regression. h e plot shows the original data points (circles), the
regression line (solid line), and the error bounds (dashed lines) of the regression. Note that
the error bounds are actually curved although they seem to be almost straight lines in the
example.
4.4 Analyzing the Residuals
When we compare how much the predicted values vary from the actual or
observed values, we are performing an analysis of the residuals. h e statistics
of the residuals provide valuable information on the quality of a model i tted
to the data. For instance, a signii cant trend in the residuals suggests that
the model does not fully describe the data. In such cases a more complex
model, such as a polynomial of a higher degree, should be i tted to the data.
Residuals are ideally purely random, i.e., they are Gaussian distributed
with a mean of zero. We therefore test the hypothesis that our residuals are
Gaussian distributed by visual inspection of the histogram and by employing
a ˇ 2 -test, as introduced in Chapter 3.
clear
agedepth = load('agedepth_1.txt');
meters = agedepth(:,1);
age = agedepth(:,2);
p = polyfit(meters,age,1);
res = age - polyval(p,meters);
Search WWH ::




Custom Search