Y = a + bX
X variabel bebas
Y variabel tak bebas
Perhatikan penomena berikut
Y = a + bX
Y = ao + a1X1 + a2X2
Perhatikan bentuk regresi linear
sederhana Y = a + bX
??? Bagaimana menentukan koefisien a dan
koefisien b ????
Ŷ a bX
Menentukan persamaan regresi
sampel 50
Buat regresi 45
40
penduganya 35
8 10 12 14 16
ads expenditures (millions of dollars)
60
sales revenue (millions of dollars)
55
50
45
40
35
8 10 12 14 16
ads expenditures (millions of dollars)
Ini tidak valid karena ada kehendak yang subjektif
Pengantar
X 10 9 11 12 11 12 13 13 14 15
Y 44 40 42 46 48 52 54 58 56 60
Bagaimana menentukan a dan b
65
sales revenue (millions of dollars)
60
55
50
45
40
35
8 10 12 14 16
ads expenditures (millions of dollars)
Rumus I
n n 2 n n
Yi X i
X i X iYi
â i 1 i 1 i 1 i 1
2
n
n
n X i X i
2
i 1 i 1
n n n
n X iYi X i Yi
b̂ i 1 i 1 i 1
2
n
n
n X i X i
2
i 1 i 1
Mari kerja dengan exel untuk contoh
berikut
X 56 54 33 42 54 34 48 62 50 38 60 55
Y 34 46 28 33 44 26 29 44 39 23 36 37
Y 6.1 0.6X
Rumus ke dua
n n n
n X iYi X i Yi
b̂ i 1 i 1 i 1
2
n
n
n X i2 X i
i 1 i 1
dari Y â b̂X
diperoleh â Y b̂ X
â 34.91666667 0.590009279 48.83333333
â 34.91666667 28.8121198 1
6.104546861
sehingga juga diperoleh
Y 6.104546861 0.590009279X
50
45
40
35
8 10 12 14 16
ads expenditures (millions of dollars)
Interpretasi a dan b
55
Model memuat
50
error, selisih nilai
45 e sebenarnya
dengan dugaan
40 Ŷ berdasar model
Y
35
8 10 12 14 16 e Y - Ŷ
ads expenditures (millions of dollars)
Bagaimana mendapatkan a dan b?
e Y - â - b̂X
n n 2
2
i i i
i 1 i 1
minimum
Rumus lain
X X Yi Y
n
i
b̂ i 1
X X
n
2
i
i 1
â Y b̂X
Rata-rata Y Rata-rata X
Ilustrasi Perhitungan
X Y X-rata Y-Y (X-rata)(Y-rata) (X-rata)2
10 44 -2 -6 12 4
9 40 -3 -10 30 9
11 42 -1 -8 8 1
12 46 0 -4 0 0
11 48 -1 -2 2 1
12 52 0 2 0 0
13 54 1 4 4 1
13 58 1 8 8 1
14 56 2 6 12 4
15 60 3 10 30 9
Y 50 X X
2
30 a = 50 – 3.533 (12) = 7.60
65
sales revenue (millions of dollars)
y = 3.5333x + 7.6
60
55
50
45
40
35
8 10 12 14 16
ads expenditures (millions of dollars)
Interpretasi a dan b
Y Ŷ
n
2
i i
b̂ - 0 s b̂ i 1
stat uji t
(n k ) X i X
n
s b̂ 2
i 1
• Nilai sb = 0.52
• Nilai t = 6.79
• Nilai t pada tabel (db = 8, = 5%) =
2.306
• Kesimpulan : Tolak H0, data
mendukung kesimpulan adanya
pengaruh ads expenditure terhadap
sales revenue.
Ukuran Kebaikan Model
R 2
Ŷ Y
i
2
Y Y
2
i
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Parameter Estimates
Parameter Standard
Variable Label DF Estimate Error t Value Pr > |t|
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Parameter Estimates
Parameter Standard
Variable Label DF Estimate Error t Value Pr > |t|
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 2 409.26761 204.63380 46.61 <.0001
Error 7 30.73239 4.39034
Corrected Total 9 440.00000
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 17.94366 5.91914 3.03 0.0191
X1 1 1.87324 0.70334 2.66 0.0323
X2 1 1.91549 0.68101 2.81 0.0260
ANOVA
• Digunakan untuk menguji secara simultan pengaruh seluruh
X
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 2 409.26761 204.63380 46.61 <.0001
Error 7 30.73239 4.39034
Corrected Total 9 440.00000
Modelnya
Y = 17.94 + 1.87 X1 + 1.91 X2
• Interpolasi vs Ekstrapolasi
• Jika pada tahun depan (tahun ke-11)
direncanakan akan mengeluarkan
belanja untuk advertisement (X1)
sebesar 15 juta dolar dan pengeluaran
untuk quality control (X2) sebesar 9
juta dolar, berapa dugaan nilai sales
revenue yang akan didapatkan?
data contoh;
input Tahun X1 X2 Y;
label X1 = 'ads expenditure (juta$)'
X2 = 'QC expenditure (juta$)'
Y = 'sales revenue (juta$)';
cards;
1 10 3 44
2 9 4 40
3 11 3 42
4 12 3 46
5 11 4 48
6 12 5 52
7 13 6 54
8 13 7 58
9 14 7 56
10 15 8 60
11 15 9 .
;
proc reg data=contoh;
model y = x1 x2/p cli;
run;
The REG Procedure
Model: MODEL1
Dependent Variable: Y sales revenue (juta$)
Output Statistics