Kuswanto-2012
����������
� ��� �� � ����� � ���������������������������� ������ � ������������������ ����� � ������ ������� �
� ������������������������� ��������� ������������������������� ������������������ ����������
� �!�������" ��#�� �!��!���� �����$����!���� ��!���� ���������%
� �!������������������ ����&�������� ����������� ����'%
Indep. Var. (X) Dep. Var (Y) Regression Equation
Fertilizer doses Yield y = b0 + b1x
Dependent VS independent variable
Evaporation Rain fall y = b0+b1x+b2x2
Sum of Leave pod yieldEtc…………
Regression vs Correlation
• The relationship between correlation and regression analysis is intertwined (saling terkait).
• Strictly speaking regression analysis is done • Strictly speaking regression analysis is done where one variable is dependent on the other variable.
• In cases where both variables are independent (leave number, plant height, example), correlation analysis is appropriate.
Bentuk umum persamaan regresiBentuk umum persamaan regresiIn general, the equation for a straight line is : Y = b0 + b1X + e– where b0 = intercept (set X = 0) (some books
written a) – b1 = slope of line Or amount of change in Y with each
unit change in X, Also called regression coefficient
b1
X
Y
0
bo
unit change in X, Also called regression coefficient
Y = b0 + b1X
yiel
d
���������������� �
fertilizer
� � ����������� ������������������� ���� ������������� ������������������
� !��� ������������ ����
yiel
d
+
++
+
-
-
���������������� �
The distance from each point to the regression line is known as the residual.
fertilizer
-
yiel
d
+
++
+
-
-
���������������� �
• Since some of these deviations are positive and some negative, we use the sum of their squares (just like with SD and variance).
• Known as least squares method.
fertilizer
+
-
BestBest--fit Linefit LineAim of linear regression is to fit a straight line, Aim of linear regression is to fit a straight line, �� = b0 + b1X, to = b0 + b1X, to data that gives best prediction of y for any value of xdata that gives best prediction of y for any value of xThis will be the line thatThis will be the line thatminimises distance betweenminimises distance betweendata and fitted line, i.e.data and fitted line, i.e.the residualsthe residuals
slope
� = b0 + b1X
intercept
= �, predicted value
slope
�
� = residual error
= y i , true value
intercept
The regression coefficient (slope) is calculated by
� x2�xyb1 =
Where �xy = �(xi – x)(yi – y)= �XY –{(�X)(�Y)}/n
And � x2 = � (xi – x)2
Menghitung Koefisien Regresi b1Menghitung Koefisien Regresi b1
So for each data point (x, y) multiply the deviation of x from the mean x by the deviation of y from the mean y.
And � x2 = � (xi – x)2
= �X2 –(�X)2/n
�X2 –(�X)2/n
�XY –{(�X)(�Y)}/nSo, b1 =
Menghitung intersep (bo)Menghitung intersep (bo)
• It can also be shown that the point (X mean, Y mean) always lies on the best fit line.– Y = b0 + b1X – Substituting, we get Y = b0 + b1X– Substituting, we get Y = b0 + b1X
Therefore, to calculate intercept, a rearrange:
bo= Y – b1X
Now, we have formulas to calculate b0 and b1
Perhatikan gugusan data pada diagram pencar ini Y
XDari gambar tersebut sebenarnya X tidak mempengaruhi Y, karena garis yang paling tepatUntuk menggambarkan adalah garis lurus, karena kemungkinan nilai b1=0
What is the chance of selecting at random a set of points where the slope (b1) does not = 0
Uji nyata regresiUji nyata regresiUntuk menguji bentuk hubungan yang digambarkan oleh persamaan regresi � ANOVA testing may be done. Anova � untuk menguji taraf nyata regresiSo Ho: b1 = 0 (that X does not affect Y)
HA: b1 � 0 (that X does affect Y)
Y
X
F = KT Regresi
KT galat
�� �� �� �� ��
������� � �� ����
�� �� ��� ������� ��
��� ���
BENTUK ANOVA REGRESIBENTUK ANOVA REGRESI
�yi2
b1�xiyi
Dimana, JK total = �y 2 = � (Yi – Y)2 = �Y2 –(�Y)2/n
And the rest of the variation is the residuals (source = residual)JK sisa = JK total – JK Regresi
Dimana, JK total = �yi2 = � (Yi – Y)2 = �Y2 –(�Y)2/n
Dimana, JK regresi = b1�xy = b1�(Xi – X)(Yi – Y)
= b1{�XY –(�X)(�Y)/n}
Koefisien DeterminasiKoefisien Determinasi� ������������� ���������������� ��������
�������� ����������� ������������ ��
JKregresi
JK Total R2 =
� � ����������������������������� ������������������������
� � �������������� � ������!�����������������������"���������#��������
� �� ������ ����������������$������������% ������ ���& ��������������� � ���������������� ������������� �����������!������������������� ������������ �����
Cara mencari persamaan regresiCara mencari persamaan regresi
�� ������������������ ��������������������� �����������������������������������������������������������������������������������������
�� ����� ������������������ �������������������������� ��������������������� ����������������������� ���������������������� ������������������������� ������������������� �
!���"�� �#
$������"�#
� %&
' (������������������� ������������������� �
�� )����������������������)��������������������������������������� �����*�������������������� �����*�������������������������������������������������������
�X2 –(�X)2/n
�XY –{(�X)(�Y)}/nb1 =
' (�
& ++
, ���
�- �%�
�� �(-
�' �,-
Cara perhitunganCara perhitunganNo Age (X) Weight (Y) XY X2 Y2
1 2 56
2 4 72
3 6 99
4 8 122
5 10 152
6 12 170
7 14 180
Sum
Mean
Buat tabel untuk menghitung jumlah tiap-tiap komponen. Kemudian isilah tabel tersebut. Hitung perkalian X dengan Y
Cara perhitunganCara perhitunganNo Age (X) Weight (Y) XY X2 Y2
1 2 56 112
2 4 72 288
3 6 99 594
4 8 122 976
5 10 152 1520
6 12 170 2040
7 14 180 2520
Sum
Mean
Hitung kuadrat dari X
Cara perhitunganCara perhitunganNo Age (X) Weight (Y) XY X2 Y2
1 2 56 112 4
2 4 72 288 16
3 6 99 594 36
4 8 122 976 64
5 10 152 1520 100
6 12 170 2040 144
7 14 180 2520 196
Sum
Mean
Hitunglah kuadrat dari Y
Cara perhitunganCara perhitunganNo Age (X) Weight (Y) XY X2 Y2
1 2 56 112 4 3136
2 4 72 288 16 5184
3 6 99 594 36 9801
4 8 122 976 64 14884
5 10 152 1520 100 23104
6 12 170 2040 144 28900
7 14 180 2520 196 32400
Sum
Mean
Hitunglah jumlah masing-masing komponen
Cara perhitunganCara perhitunganNo Age (X) Weight (Y) XY X2 Y2
1 2 56 112 4 3136
2 4 72 288 16 5184
3 6 99 594 36 9801
4 8 122 976 64 14884
5 10 152 1520 100 23104
6 12 170 2040 144 28900
7 14 180 2520 196 32400
Sum 56 851 8050 560 117409
Mean
Hitung nilai rata-rata X dan Y � untuk menghitung intersep
Tabel lengkap, kemudian masukkan ke rumus …….Tabel lengkap, kemudian masukkan ke rumus …….
No Age (X) Weight (Y) XY X2 Y2
1 2 56 112 4 3136
2 4 72 288 16 5184
3 6 99 594 36 9801
4 8 122 976 64 14884
5 10 152 1520 100 23104
6 12 170 2040 144 28900
7 14 180 2520 196 32400
Sum 56 851 8050 560 117409
Mean 8 121,57
……. untuk menghitung koefisien regresi dan intersep
Masukkan rumusMasukkan rumus
�X2 –(�X)2/n
�XY –{(�X)(�Y)}/nb1 =
560 –(56)2/7
8050 –{(56)(851)}/7= = 11,089
Hitung nilai intersep bo = Y – b1X = 121,57 – (11,089) (8)= 32,857
Dapat juga dituliskan y = 11,089x + 32,857. Kemudian Gambarlah garis regresinya �….
Garis Regresi Linier
80100120140160180200
Wei
ght (
g)
Gambar garis regresinyaGambar garis regresinya
y = 11,089x + 32,857R2 = 0,9872
020406080
0 2 4 6 8 10 12 14Age (days)
Wei
ght (
g)
Hitung anova regresiHitung anova regresi
JK Total = �Y2 –(�Y)2/n = 117409 –(851)2/7 = 13951,71
JK regresi = b1 {�XY –(�X)(�Y)/n}
= 11,089 x {8050 –(56)(851)/7}= 11,089 x {8050 –(56)(851)/7}
Setelah ketemu, masukkan dalam tabel anova regresi
= 13.772,89
JK sisa = JK total – JK regresi = 178,82
(���������(���������
Sumber Sumber keragamankeragaman
DbDb JKJK KTKT F hitF hit
RegresiRegresi 11 13.772,8913.772,89 13.772,8913.772,89 385,15****
Residu (sisa)Residu (sisa) 55 178,82178,82 35,7635,76Residu (sisa)Residu (sisa) 55 178,82178,82 35,7635,76
TotalTotal 66 13.951,7113.951,71
Koefisien Determinasi R2 = JK Regresi/JK Total
= 0,9872
Kesimpulan dan interpretasiKesimpulan dan interpretasi�� Hubungan antara umur buah dengan bobot Hubungan antara umur buah dengan bobot
dapat dituliskan dengan persamaan regresi linier dapat dituliskan dengan persamaan regresi linier Y= 32,857 +Y= 32,857 +11,089X, artinya setiap penambahan umur satu hari, bobot buah akan bertambah 11,089 gram. Dari tabel anova dapat disimpulkan bahwa Dari tabel anova dapat disimpulkan bahwa �� Dari tabel anova dapat disimpulkan bahwa Dari tabel anova dapat disimpulkan bahwa terdapat hubungan regresi yang sangat nyata terdapat hubungan regresi yang sangat nyata antara umur buah dengan bobot buah antara umur buah dengan bobot buah berdasarkan regresi linier. berdasarkan regresi linier.
�� Dari koefisien determinasi dapat disimpulkan Dari koefisien determinasi dapat disimpulkan bahwa sebanyak 98,72% keragaman berat buah bahwa sebanyak 98,72% keragaman berat buah disebabkan oleh pengaruh umur buahdisebabkan oleh pengaruh umur buah
Interpretasi : Interpretasi : perhatikan persamaan iniperhatikan persamaan ini
.�/�0��,%(�1����-,+2
��$����*������*�� �� ����3��4��5����������5�$����*������*�� �� ����3��4��5����������5�%��� �6�%��� �6�77 .�/�0��,(%�1�"���-,+#"%#�/�,,�0���.�/�0��,(%�1�"���-,+#"%#�/�,,�0���77 .�/�0��,(%�1�"���-,+#"%#�/�,,�0���.�/�0��,(%�1�"���-,+#"%#�/�,,�0���
��8��������������������������������8�����������������������������������4������--��6���4������--��677 �--�/�0��,(%1���-,+�2�--�/�0��,(%1���-,+�277 9����2�/�"�--9����2�/�"�--��0��,(%#���-,+�/�&�-%0������0��,(%#���-,+�/�&�-%0������
������������������������������������������������������������������������������������������������������������������ ��� �:���������������������������������� ��� �:������� ��������������������������;������ ��������������������������;�
BahanBahanDiskusiDiskusi
Untuk analisis regresi, Untuk analisis regresi, carilah data carilah data independen dan independen dan dependen, cari dependen, cari persamaan regresinya, persamaan regresinya, tunjukkan gambarnya, tunjukkan gambarnya, tunjukkan gambarnya, tunjukkan gambarnya, hitunglah anovanya, hitunglah anovanya, hitung koefisien hitung koefisien determinasinya, dan determinasinya, dan berikan kesimpulannyaberikan kesimpulannya