Na 11
Na 11
Na 11
11
CURVE FİTTİNG
There are two general approaches for curve fitting:
• Interpolation:
Data is very precise. The strategy is to pass a
curve or a series of curves through each of the
points.
MATHEMATİCAL BACKGROUND
Arithmetic mean. The sum of the individual data
points (yi) divided by the number of points (n).
y
y i
, i 1, , n
n
i y y
2 2
( y y ) 2
/n
S
2
or S 2
i i
n 1
y
n 1
y
Sy
c.v. 100 %
y
LEAST SQUARES REGRESSİON
Linear Regression
Fitting a straight line to a set of paired
observations: (x1, y1), (x2, y2),…,(xn, yn).
y = a0+ a1 x + e
a1 - slope
a0 - intercept
e - error, or residual, between the model and
the observations
CRİTERİA FOR A “BEST” FİT
n n
min | e | | y a
i 1
i
i 1
i 0 a1 xi |
CRİTERİA FOR A “BEST” FİT
n n
min S r i e 2
( yi a0 a1 xi ) 2
i 1 i 1
The coefficients a0 and a1 that minimize Sr
must satisfy the following conditions:
S r S r
2 ( yi ao a1 xi ) 0
a 0 ao
0
S r
S r 0 2 ( yi ao a1 xi ) xi 0
a1
a1
0 yi a 0 a1 xi
0 yi xi a 0 xi a1 xi2
a 0 na0
na0 xi a1 yi 2 equations with 2 unknowns,
ii 0i 1i
y x a x a x 2 can be solved simultaneously
n xi yi xi yi
a1 a0 y a1 x
n xi2 xi
2
𝑆𝑟
𝑆𝑦/𝑥 =
𝑛−2
where Sy/x is the standard error of the estimate.
St S r
r 2
St
r2: coefficient of determination
r : correlation coefficient
For a perfect fit:
Sr= 0 and r = r2 =1, signifying that the line explains 100
percent of the variability of the data.
For r = r2 = 0, Sr = St, the fit represents no improvement.
EXP 11-1: Fit a straight line to x, y values given below.
x y
0 200
3 230
5 240
8 270
10 290
EXP 11-2: Fit a straight line to x, y values given below, and
calculate the standard deviation, the standard error of the
estimate, and correlation coefficient of the data.
x y
1 0,5
2 2,5
3 2
4 4
5 3,5
6 6
7 5,5