pencocokan kurva/data (curve/data...
TRANSCRIPT
PENCOCOKAN KURVA/DATA
(CURVE/DATA FITTING)
Three attempts to fit a “best” curve through five data points. (a) Least
squares regression, (b) linear interpolation, and (c) curvilinear
interpolation
Least-Squares RegressionCriteria for a “Best” Fit
Examples of some criteria for “best fit” that are inadequate for regression:
(a) minimizes the sum of the residuals, (b) minimizes the sum of the
absolute values of the residuals, and (c) minimizes the maximum error of
any individual point.
Pencocokan Data (Data Fitting)
Pencocokan Data ke Garis Lurus
Pencocokan Data ke Polinomial
y a bx
n
nxaxaxaxaay 3
3
2
210
m
l
ll xfaxy0
)()(
Contoh Pencocokan Data ke Garis Lurus
i xi yi si
1 1.0 1,5 0,3
2 2.0 1,7 0,2
3 3.0 3,6 0,2
4 4.0 4,3 0,1
5 5.0 5,8 0,2
6 6.0 6,1 0,3
7 7.0 6,4 0,1
8 8.0 7,4 0,1
9 9.0 9,8 0,3
akan dicari persamaan
garis lurus yang cocok
untuk pasangan data ini ii bxay ˆ
yang berarti mencari
koefisian a, sa ,b dansb
berdasarkan pasangan data
eksperimental
Data Eksperimental
Dengan asumsi bahwa pasangan data merupakan
sampel dari populasi yang berditribusi Normal (Gauss)
dengan kebolehjadian total n pasangan data adalah:
n
i
yy
i
i i
ii
eyP1
ˆ
2
12
2
1),(
s
ss
dan menggunakan asas kuadrat terkecil (least squares)
maka koefisien a, sa ,b dan sb ditentukan dengan persamaan:
i i
ii yy2
2 ˆ
s
minimum
02
a
0
2
b
ax y x y xi
i
i
i
i
i
i i
i
12
2 2 2 2 s s s s
bx y x y
i
i i
i
i
i
i
i
1 12 2 2 2 s s s s
2
21
i
ia
x
ss
2
11
i
bs
s
Persamaan Regresi Linear untuk ralat pengukuran tidak sama
12
2
2 2
2
s s si
i
i
i
i
x x
Contoh Pencocokan Data ke Garis Lurus
(ralat pengukuran sama)
i xi yi si
1 1.0 1,5 0,2
2 2.0 1,7 0,2
3 3.0 3,6 0,2
4 4.0 4,3 0,2
5 5.0 5,8 0,2
6 6.0 6,1 0,2
7 7.0 6,4 0,2
8 8.0 7,4 0,2
9 9.0 9,8 0,2
akan dicari persamaan
garis lurusyang cocok
untuk pasangan data ini ii bxay ˆ
yang berarti mencari
koefisian a, sa ,b dansb
berdasarkan pasangan data
eksperimental
Data Eksperimental
iiiii yxxyxa 21
iiii yxyxNb1
22 ii xxN
Persamaan Regresi Linear untuk ralat pengukuran sama
2
2
ia xs
s
2s
sN
b
2222 )(2
1)(
2
1iiii yy
Nbxay
Ns
s
GOODNESS OF FIT
2
2
2 )(1
ii
i
xyys
22
If the fitting function is a good approximation
to the parent function, the value of the
reduced chi-square should be approximately
unity
12
Estimasi Ralat untuk Fungsi Termodifikasi
Jika kita memodifikasi fungsi dalam pencocokan data, yaitu yi
dengan koefisien a, b dimodifiksai menjadi yi’=f(yi) dengan
koefisien a’, b’, maka :
a’=fa(a) b’=fb(b)
aa
aa
afss
d
)(d' bb
bb
bfss
d
)(d'
Linearization of Nonlinear Relationships
(a)The exponential equation, (b) the power equation, and (c) the saturation-
growth-rate equation. Parts (d), (e), and (f) are linearized versions of these
equations that result from simple transformations.
POLYNOMIAL REGRESSIONThe second-order polynomial or quadratic
The squares of the residuals is
take the derivative of Eq. respect to each of the unknown coefficients of the
polynomial, as in
POLYNOMIAL REGRESSION
These equations can be set equal to zero and rearranged to develop the
following set of normal equations:
MULTIPLE LINEAR REGRESSIONFor example, y might be a linear function of x1 and x2, as in
Graphical depiction of multiple linear regression where y is a linear
function of x1 and x2.
MULTIPLE LINEAR REGRESSION
Quantification of Error of Linear Regression
Regression data showing (a) the spread of the data around
the mean of the dependent variable and (b) the spread of the
data around the best-fit line. The reduction in the spread in
going from (a) to (b), as indicated by the bell-shaped curves
at the right, represents the improvement due to linear
regression.
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
r2 is called the coefficient of determination and r is the
correlation coefficient
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
Quantification of Error of Linear Regression
(a) Results using linear regression to comparepredictions computed with the theoretical model [Eq.(1.10)] versus measured values. (b) Results usinglinear regression to compare predictions computed withthe empirical model [Eq. (E17.3.1)] versus measuredvalues
Latihan Curve Fitting Impedansi rangkaian RL dinyatakan oleh persamaan :
Suatu percobaan untuk mengukur R dan L telah dilakukan
menggunakan rangkaian RL. Frekuensi f divariasi kemudian Z
diukur, dan didapatkan data sebagai barikut:
Dengan menggunakan analisis regresi linear hitunglah L ±L dan
R ± R.
2222 4 LfRZ
No. f (Hz) Z (ohm) Z
1 120 7,4 0,2
2 160 8,4 0,1
3 190 9,1 0,2
4 200 9,6 0,2
5 230 10,3 0,1
6 240 10,5 0,2
7 270 11,4 0,1
8 290 11,9 0,1
9 300 12,2 0,1
LL s LL s
Latihan Curve Fitting Gunakan analisis regresi linear untuk mencocokkan
model eksponensial :
terhadap data eksperimen di bawah ini:
Hitunglah A ± sA dan B ± sB
BXAeY
X 0,05 0,4 0,8 1,2 1,6 2,0 2,4
Y 550 750 1000 1400 2000 2700 3750
Latihan Curve Fitting
PENCOCOKAN DATA KE POLINOMIAL
LEGENDRE
Data Distribusi Cacah Emisi Sinar Gamma
terhadap Sudut