PENGAJAR:
TOTO WARSA, IR., MS.
Oleh
Ade Setiawan
1502 2006 0003
1
DATA
MALES FEMALES
No Y X Y X
1 17.1 0.301 18.5 0.301
2 14.3 0.301 22.1 0.301
3 21.6 0.301 15.3 0.301
4 24.5 0.602 23.6 0.602
5 20.6 0.602 26.9 0.602
6 23.8 0.602 20.2 0.602
7 27.7 0.903 24.3 0.903
8 31.0 0.903 27.1 0.903
9 29.4 0.903 30.1 0.903
10 30.1 1.204 28.1 0.903
11 28.6 1.204 30.3 1.204
12 34.2 1.204 33.0 1.204
13 37.3 1.204 35.8 1.204
14 33.3 1.505 32.6 1.505
15 31.8 1.505 36.1 1.505
16 40.2 1.505 30.5 1.505
Soal:
a. Determine the dose-response straight lines separately for each sex and plot them on the same graph!
b. Test Whether the slopes for males and females are diferent
c. Find a 99% confidence interval for the true difference between the male and female slopes
d. Test for coincidence of the two straight lines
e. Jika Anda menggunakan variabel boneka (dummy), tulislah rincian prosedur untuk menjawab pertanyaan b dan d.
2
Jawab:
No MALES FEMALES
Y X y x y2 x2 xy Y X y x y2 x2 xy
1 17.1 0.301 -10.7438 -0.62081 115.4282 0.385408 6.669854 18.5 0.301 -8.65625 -0.602 74.93066 0.362404 5.211063
2 14.3 0.301 -13.5438 -0.62081 183.4332 0.385408 8.408129 22.1 0.301 -5.05625 -0.602 25.56566 0.362404 3.043863
3 21.6 0.301 -6.24375 -0.62081 38.98441 0.385408 3.876198 15.3 0.301 -11.8563 -0.602 140.5707 0.362404 7.137463
4 24.5 0.602 -3.34375 -0.31981 11.18066 0.10228 1.069373 23.6 0.602 -3.55625 -0.301 12.64691 0.090601 1.070431
5 20.6 0.602 -7.24375 -0.31981 52.47191 0.10228 2.316642 26.9 0.602 -0.25625 -0.301 0.065664 0.090601 0.077131
6 23.8 0.602 -4.04375 -0.31981 16.35191 0.10228 1.293242 20.2 0.602 -6.95625 -0.301 48.38941 0.090601 2.093831
7 27.7 0.903 -0.14375 -0.01881 0.020664 0.000354 0.002704 24.3 0.903 -2.85625 0 8.158164 0 0
8 31 0.903 3.15625 -0.01881 9.961914 0.000354 -0.05938 27.1 0.903 -0.05625 0 0.003164 0 0
9 29.4 0.903 1.55625 -0.01881 2.421914 0.000354 -0.02928 30.1 0.903 2.94375 0 8.665664 0 0
10 30.1 1.204 2.25625 0.282188 5.090664 0.07963 0.636686 28.1 0.903 0.94375 0 0.890664 0 0
11 28.6 1.204 0.75625 0.282188 0.571914 0.07963 0.213404 30.3 1.204 3.14375 0.301 9.883164 0.090601 0.946269
12 34.2 1.204 6.35625 0.282188 40.40191 0.07963 1.793654 33 1.204 5.84375 0.301 34.14941 0.090601 1.758969
13 37.3 1.204 9.45625 0.282188 89.42066 0.07963 2.668436 35.8 1.204 8.64375 0.301 74.71441 0.090601 2.601769
14 33.3 1.505 5.45625 0.583188 29.77066 0.340108 3.182017 32.6 1.505 5.44375 0.602 29.63441 0.362404 3.277138
15 31.8 1.505 3.95625 0.583188 15.65191 0.340108 2.307236 36.1 1.505 8.94375 0.602 79.99066 0.362404 5.384138
16 40.2 1.505 12.35625 0.583188 152.6769 0.340108 7.206011 30.5 1.505 3.34375 0.602 11.18066 0.362404 2.012938
Jumlah 445.5 14.749 0 0 763.8394 2.802968 41.55493 434.5 14.448 -6E-14 2E-15 559.4394 2.71803 34.615
Rataan 27.84375 0.921813 6.66E-16 1.39E-17 47.73996 0.175186 2.597183 27.15625 0.903 -3.8E-15 1.25E-16 34.96496 0.169877 2.163438
3
Dari tabel di atas diperoleh:
Male Female
n 16 16
X 0.921813 0.903
Y 27.84375 27.15625
Σx2 2.802968438 2.71803
Σxy 41.55493125 34.615
Σy2 763.839375 559.439375
b Σxy Σxy
b= b=
Σx 2 Σx 2
41.55493 34.615
= =
2.802968 2.71803
= 14.82533 = 12.73533
a a = Y − bX a = Y − bX
= 27.84375 - (14.82533)(0.921813) = 27.15625 - (12.73533)(0.903)
= 14.17758 = 15.65625
JK Residu (Σxy ) 2 (Σxy ) 2
= Σy 2 − = Σy 2 −
Σx 2 Σx 2
(41.55493) 2 (34.615) 2
= 763.8394 - = 559.4394 -
2.802968 2.71803
= 147.7738 = 118.606
S2yx 10.55527273 8.471860119
1. Male:
Y = 14.17758 + 14.82533 X
2. Female:
Y = 15.65625 + 12.73533 X
4
45
40 Male:
y = 14.825x + 14.178
35
Growth Rate R2 = 0.8065
30
25
Female:
20
y = 12.735x + 15.656
15
R2 = 0.788
10
5
0
0 0.301 0.602 0.903 1.204 1.505 1.806
Log10 Dose
Male Female Linear (Male) Linear (Female)
b. Uji Ketidaksejaran
Ho: β1 = β2
JK Residu Male + JK Residu Female
(S 2 yx ) p =
n1 + n 2 - 4
147.7738 + 118.606
=
16 + 16 - 4
= 9.513566
⎡ 1 1 ⎤
S 2 b1− b2 = (S 2 yx ) p ⎢ 2 + 2 ⎥
⎣ Σx 1 Σx 2 ⎦
⎡ 1 1 ⎤
= 9.513566⎢ + ⎥
⎣ 2.802968 2.71803 ⎦
= 6.894274
S b1− b2 = 6.894274
= 2.625695
b1 - b 2
t=
S b1-b2
14.82533 - 12.73533
=
2.625695
= 0.795981
Karena t(0.023 ; 28) < thitung = 0.795981 < 2.048, maka terima Ho: β1 = β2
5
Hal ini menunjukkan bahwa kemiringan Persamaan garis male dan female tidak
berbeda pada taraf nyata 0.05 yang berarti kedua garis tersebut sejajar.
= (9.048302; 20.60236)
= (7.479499;17.99115)
6
Gabungan:
Ac = (Σx 2 )1 + (Σx 2 ) 2
= 2.802968 + 2.71803
= 5.520998
Bc = (Σxy )1 + (Σxy ) 2
= 41.55493 + 34.615
= 76.16993
Cc = (Σy 2 )1 + (Σy 2 ) 2
= 763.8394 + 559.4394
= 1323.279
(Σxy )1 + (Σxy ) 2
bc =
(Σx 2 )1 + (Σx 2 ) 2
76.16993
=
5.520998
= 13.79641
JKc 272.4075
(S 2 yx )c = =
DBc 16 + 16 - 3
= 9.393363
(s 2 yx ) c
Selang kepercayaan = b c ± t α 2 2
Σx 1 + Σx 2
(s 2 yx ) c
= bc ± t (0.01;29) 2 2
Σx 1 + Σx 2
9.393363
= 13.79641 ± 2.7564
2.802968 + 2.71803
= 13.79641 ± 3.881344
= (9.915061; 17.67775)
7
d. Uji Keberimpitan
( y1 − y 2 ) − bc( x1 − x 2 )
t=
⎡1 1 ( x1 − x 2 ) 2 ⎤
( s 2 yx ) c ⎢ + + ⎥
⎣ n1 n2 Ac ⎦
= 0.364288
Karena t(0.025 ; 29) < thitung = 0.36428767 < 2.0452, maka terima Ho: α1 = α2
8
e. Penggunaan Dummy variable
Male : Female :
y1 = β 0 + β 1 X 1 + β 2 Z 1 + β 3 X 1 Z 1 + ε 1 y 2 = β 0 + β1 X 2 + β 2 Z 2 + β 3 X 2 Z 2 + ε 2
= β 0 + β1 X 1 + β 2 0 + β 3 X 1 0 + ε i = β 0 + β1 X 2 + β 2 1 + β 3 X 2 1 + ε 2
y1 = β 0 + β 1 X 1 + ε i y 2 = β 0 + β1 X 2 + β 2 + β 3 X 2 + ε 2
y 2 = ( β 0 + β 2 ) + (β1 + β 3 ) X 2 + ε 2
Hipotesis Ketidaksejajaran:
H0: β3 = 0 lawan H1: β3 ≠ 0
Hipotesis Ketidakberimpitan:
H0: β2 = 0 lawan H1: β2 ≠ 0
Matriks Data
No X Z XZ Y
1 0.301 0 0 17.1
2 0.301 0 0 14.3
3 0.301 0 0 21.6
4 0.602 0 0 24.5
5 0.602 0 0 20.6
6 0.602 0 0 23.8
7 0.903 0 0 27.7
8 0.903 0 0 31
9 0.903 0 0 29.4
10 1.204 0 0 30.1
11 1.204 0 0 28.6
12 1.204 0 0 34.2
13 1.204 0 0 37.3
14 1.505 0 0 33.3
15 1.505 0 0 31.8
16 1.505 0 0 40.2
17 0.301 1 0.301 18.5
18 0.301 1 0.301 22.1
19 0.301 1 0.301 15.3
20 0.602 1 0.602 23.6
9
No X Z XZ Y
21 0.602 1 0.602 26.9
22 0.602 1 0.602 20.2
23 0.903 1 0.903 24.3
24 0.903 1 0.903 27.1
25 0.903 1 0.903 30.1
26 0.903 1 0.903 28.1
27 1.204 1 1.204 30.3
28 1.204 1 1.204 33
29 1.204 1 1.204 35.8
30 1.505 1 1.505 32.6
31 1.505 1 1.505 36.1
32 1.505 1 1.505 30.5
SUMMARY OUTPUT
Regression Statistics
Multiple R 0.8940194
R Square 0.7992707
Adjusted R Square 0.7777640
Standard Error 3.0844070
Observations 32
Untuk melihat signifikansi dari nilai koefisien β, bisa digunakan dengan Uji t atau Uji F.
Uji t
Parameter Coefficients Standard Error t Stat P-value Lower 95.0% Upper 95.0%
β0 : (Intercept) 14.17757576 1.865126812 7.601400433 2.79405E-08 10.35703673 17.99811479
β1 : (X) 14.82532971 1.842309424 8.047144262 9.20114E-09 11.05152998 18.59912944
β2 : (Z) 1.478674242 2.631988954 0.561808681 0.578716176 -3.912710657 6.870059141
β3 : (XZ) -2.09000302 2.625694913 -0.795980908 0.432740111 -7.468495161 3.288489121
10
Persamaan:
Male
y1 = β 0 + β 1 X 1 + ε i
y1 = 14.1775758 + 14.82533 X 1 + ε i
Female
y 2 = ( β 0 + β 2 ) + ( β1 + β 3 ) X 2 + ε 2
y 2 = ( 14.17757576 + 1.478674242 ) + ( 14.82532971 − 2.09000302 )X 2
= 15.65625 + 12.73533 X 2
Hipotesis Ketidaksejajaran:
Dari Uji t ataupun F, tampak bahwa β3 tidak nyata, yang berarti H0: β3 = 0 diterima.
Hal ini berarti kedua kemiringan (slopes) persamaan regresi tersebut sejajar.
Hipotesis Ketidakberimpitan:
Dari Uji t ataupun F, juga tampak bahwa β2 tidak nyata, yang berarti H0: β2 = 0
diterima. Hal ini menunjukkan bahwa kedua elevasi garis tersebut sama.
Kesimpulan:
kedua garis tersebut berimpit.
Karena kemiringan dan elevasi dianggap sama, maka persamaan garis regresi tersebut
harus ditulis:
Yˆi = ac + bc X i
(n1 x1 + n 2 x 2 ) (n1 y1 + n2 y 2 )
xp = yp =
n1 + n2 n1 + n2
(16)(0.92181) + (16)(0.903) (16)(27.84375) + (16)(27.15625)
= =
16 + 16 16 + 16
= 0.912406 = 27.5
a c = y p − bc x p
Dari perhitungan point c:
= 27.5 − 13.79641(0.912406)
bc = 13.79641
= 14.91207
11
Persamaan kedua regresi:
Yˆi = 14.91207 + 13.79641 X i
40
35
30
Growth Rate (Y)
25
y = 13.796x + 14.912
20
15
10
5
0
0 0.301 0.602 0.903 1.204 1.505 1.806
Log10 Dose (X)
12