Geoscience Reference
In-Depth Information
h e variable delta is an estimate of the standard deviation of the prediction
error of a future observation at x by p(x) . We then plot the results:
plot(meters,age,'o',meters,p_age,'g-',...
meters,p_age+2*delta,'r', meters,p_age-2*delta,'r')
axis([0 20 0 140]), grid on
xlabel('Depth in Sediment (meters)')
ylabel('Age of Sediment (kyrs)')
We now use another synthetic data set that we generate using a quadratic
relationship between meters and age.
clear
rng(0)
meters = 20 * rand(30,1);
age = 1.6 * meters.^2 - 1.1 * meters + 50;
age = age + 40.* randn(length(meters),1);
plot(meters,age,'o')
agedepth(:,1) = meters;
agedepth(:,2) = age;
agedepth = sortrows(agedepth,1);
save agedepth_2.txt agedepth -ascii
h e synthetic bivariate data set can be loaded from the i le agedepth_2.txt .
clear
agedepth = load('agedepth_2.txt');
meters = agedepth(:,1);
age = agedepth(:,2);
plot(meters,age,'o')
Fitting a second order polynomial yields a convincing regression result.
p = polyfit(meters,age,2)
p =
1.8356 -7.0653 74.1526
As shown above, the true values for the three coei cients are +1.8, -7.1 and
+74.2, which means that there are some discrepancies between the true
values and the coei cients estimated using polyfit . h e regression curve and
the error bounds can be plotted by typing (Fig. 4.8)
plot(meters,age,'o'), hold on
Search WWH ::




Custom Search