Вы находитесь на странице: 1из 37

2002 Prentice-Hall, Inc.

Chap 11-1
Analisis Regresi
Noorlaily Fitdiarini, SE., MBA.
2002 Prentice-Hall, Inc.

Chap 11-2
Tujuan Analisis Regresi
X2 tests of independence digunakan untuk
menentukan adanya suatu hubungan statistik
antara 2 variabel, tetapi tidak menyebutkan
bagaimana hubungannya.
Analisis Regresi & Korelasi menunjukkan baik sifat
maupun kuatnya suatu hubungan antara kedua
variabel tersebut.
Setiap regresi pasti ada korelasinya, tetapi korelasi
belum tentu dilanjutkan oleh regresi.
Korelasi yang tidak dilanjutkan dengan regresi
adalah korelasi antara 2 variabel yang tidak
mempunyai hubungan kausal/sebab-akibat, atau
hubungan fungsional (berdasarkan teori/konsep)
2002 Prentice-Hall, Inc.

Chap 11-3
Macam-macam Model Regresi
Positive Linear Relationship
Negative Linear Relationship
Relationship NOT Linear
No Relationship
2002 Prentice-Hall, Inc.

Chap 11-4
Model Regresi Linear Sederhana
Hubungan di antara 2 variabel
digambarkan dengan fungsi linear
Perubahan pada satu variabel
menyebabkan perubahan pada variabel
yang lain
Ada ketergantungan satu variabel
terhadap yang lain
2002 Prentice-Hall, Inc.

Chap 11-5
Regresi Linear

Y intercept
Slope
Coefficient
Random
Error
Dependent
(Response)
Variable
Independent
(Explanatory)
Variable
i i i
Y X | | c
0 1
+ + =
2002 Prentice-Hall, Inc.

Chap 11-6
Regresi Linear
(continued)
i i i
Y X | | c
0 1
+ + =
= Random Error
Y
X
(Observed Value of Y) =
Observed Value of Y
i
c
|
0
|
1
2002 Prentice-Hall, Inc.

Chap 11-7
Interpretasi dari
Slope dan Intercept
adalah rata-rata dari nilai Y
jika nilai X sama dengan 0.

mengukur perubahan pada
rata-rata nilai Y sebagai akibat dari perubahan
satu unit X.
( )
| 0 E Y X |
0
= =
( )
1
| E Y X
X
|
A
=
A
2002 Prentice-Hall, Inc.

Chap 11-8
adalah rata-rata dari nilai Y
yang diestimasi jika nilai X sama dengan 0.

perubahan yang diestimasi
pada rata-rata nilai Y sebagai akibat dari perubahan
satu unit X.

(continued)
( )

| 0 b E Y X
0
= =
( )
1

| E Y X
b
X
A
=
A
Interpretation of the
Slope and the Intercept
2002 Prentice-Hall, Inc.

Chap 11-9
Regresi Linear Sederhana:
Contoh Kasus
Anda ingin menguji
ketergantungan linear
dari penjualan tahunan
dari suatu toko
terhadap ukuran/luas
toko. Sampel data
untuk 7 toko diperoleh.
Bagaimana persamaan
garis lurus yang paling
sesuai dengan data
tersebut?
Annual
Store Square Sales
Feet ($1000)
1 1,726 3,681
2 1,542 3,395
3 2,816 6,653
4 5,555 9,543
5 1,292 3,318
6 2,208 5,563
7 1,313 3,760

2002 Prentice-Hall, Inc.

Chap 11-10
Scatter Diagram: Contoh Kasus
0
2 0 0 0
4 0 0 0
6 0 0 0
8 0 0 0
1 0 0 0 0
1 2 0 0 0
0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0
S qua re Fe e t
A
n
n
u
a
l

S
a
l
e
s

(
$
0
0
0
)
Excel Output
2002 Prentice-Hall, Inc.

Chap 11-11
Persamaan Garis Regresi:
Contoh Kasus
0 1

1636.415 1.487
i i
i
Y b b X
X
= +
= +
From Excel Printout:
Co effi ci en ts
I n t e r c e p t 1 6 3 6 . 4 1 4 7 2 6
X V a r i a b l e 1 1 . 4 8 6 6 3 3 6 5 7
2002 Prentice-Hall, Inc.

Chap 11-12
Graph of the Sample
Regression Line: Example
0
2 0 0 0
4 0 0 0
6 0 0 0
8 0 0 0
1 0 0 0 0
1 2 0 0 0
0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0
S q u a r e F e e t
A
n
n
u
a
l

S
a
l
e
s

(
$
0
0
0
)
2002 Prentice-Hall, Inc.

Chap 11-13
Interpretation of Results:
Contoh Kasus
Slope = 1.487 berarti bahwa untuk setiap
peningkatan satu unit X, kita memprediksikan rata-
rata Y akan meningkat kira-kira sebesar 1,487 unit
Jadi setiap peningkatan 1 sq foot ukuran toko,
diperkirana penjual tahunan akan meningkat
sebesar $1487.

1636.415 1.487
i i
Y X = +
2002 Prentice-Hall, Inc.

Chap 11-14
Measure of Variation:
The Sum of Squares
(continued)
X
i
Y
X
Y
SST = (Y
i
- Y)
2
SSE =(Y
i
- Y
i
)
2

.
SSR = (Y
i
- Y)
2


.
_
_
_
2002 Prentice-Hall, Inc.

Chap 11-15
The ANOVA Table in Excel
ANOVA
df SS MS F
Significance
F
Regression p SSR
MSR
=SSR/p
MSR/MSE
P-value of
the F Test
Residuals n-p-1 SSE
MSE
=SSE/(n-p-1)
Total n-1 SST
2002 Prentice-Hall, Inc.

Chap 11-16
Measures of Variation
The Sum of Squares: Example
ANOVA
df SS MS F Significance F
Regression 1 30380456.12 30380456 81.17909 0.000281201
Residual 5 1871199.595 374239.92
Total 6 32251655.71
Excel Output for Produce Stores
SSR
SSE
Regression (explained) df
Degrees of freedom
Error (residual) df
Total df
SST
2002 Prentice-Hall, Inc.

Chap 11-17
The Coefficient of Determination &
Standard Error of Estimate
Coefficient of Determination


Mengukur proporsi dari variasi Y yang diterangkan
oleh variabel independen X pada model regresi
Standard Error of Estimate:
2
Regression Sum of Squares
Total Sum of Squares
SSR
r
SST
= =
( )
2
1

2 2
n
i
i
YX
Y Y
SSE
S
n n
=

= =

Standar deviasi dari variasi observasi sekitar garis


regresi
2002 Prentice-Hall, Inc.

Chap 11-18
Measures of Variation:
Produce Store Example
Reg ressi o n S tati sti cs
M u l t i p l e R 0 . 9 7 0 5 5 7 2
R S q u a r e 0 . 9 4 1 9 8 1 2 9
A d j u s t e d R S q u a r e 0 . 9 3 0 3 7 7 5 4
S t a n d a r d E r r o r 6 1 1 . 7 5 1 5 1 7
O b s e r va t i o n s 7
Excel Output for Produce Stores
r
2
= .94
94% dari variasi penjualan tahunan
dijelaskan oleh variabilitas ukuran toko (yang
diukur dengan sq foot)
S
yx
2002 Prentice-Hall, Inc.

Chap 11-19
Inference about the Slope:
t Test
t test for a population slope
Apakah terdapat suatu ketergantungan linear dari Y
terhadap X?
Null and alternative hypotheses
H
0
: |
1
= 0 (tidak ada ketergantungan linear)
H
1
: |
1
= 0 (ketergantungan linear)
Test statistic




1
1
1 1
2
1
where
( )
YX
b
n
b
i
i
b S
t S
S
X X
|
=

= =

. . 2 d f n =
2002 Prentice-Hall, Inc.

Chap 11-20
Example: Produce Store
Data for Seven Stores:
Estimated
Regression
Equation:
The slope of this
model is 1.487.
Is square footage of
the store affecting its
annual sales?
.
Annual
Store Square Sales
Feet ($000)
1 1,726 3,681
2 1,542 3,395
3 2,816 6,653
4 5,555 9,543
5 1,292 3,318
6 2,208 5,563
7 1,313 3,760

Y
i
= 1636.415 +1.487X
i
2002 Prentice-Hall, Inc.

Chap 11-21
Inferences about the Slope:
t Test Example
H
0
: |
1
= 0
H
1
: |
1
= 0
o = .05
df = 7 - 2 = 5
Critical Value(s):
Test Statistic:
Keputusan:

Kesimpulan:

Terdapat bukti bahwa
ukuran toko (sq foot)
mempengaruhi penjualan
tahunan.
t
0 2.5706 -2.5706
.025
Reject Reject
.025
From Excel Printout
Reject H
0
Coefficients Standard Error t Stat P-value
Intercept 1636.4147 451.4953 3.6244 0.01515
Footage 1.4866 0.1650 9.0099 0.00028
1
b
1
b
S
t
2002 Prentice-Hall, Inc.

Chap 11-22
Inferences about the Slope:
Confidence Interval Example
Confidence Interval Estimate of the Slope:
1
1 2 n b
b t S

Excel Printout for Produce Stores


Pada 95% level of confidence, the confidence
interval untuk slope adalah (1.062, 1.911). Di atas 0.
Kesimpulan: Terdapat suatu ketergantungan linear
yang signifikan dari penjualan tahunan terhadap
ukuran toko.
Lower 95% Upper 95%
I n te r c e p t 4 7 5 . 8 1 0 9 2 6 2 7 9 7 . 0 1 8 5 3
X V a r i a b l e 11 . 0 6 2 4 9 0 3 7 1 . 9 1 0 7 7 6 9 4
2002 Prentice-Hall, Inc.

Chap 11-23
ANOVA
df SS MS F Significance F
Regression 1 30380456.12 30380456.12 81.179 0.000281
Residual 5 1871199.595 374239.919
Total 6 32251655.71
Inferences about the Slope:
F Test Example
Test Statistic:
Decision:
Conclusion:

H
0
: |
1
= 0
H
1
: |
1
= 0
o = .05
numerator
df = 1
denominator
df = 7 - 2 = 5


There is evidence that
square footage affects
annual sales.
From Excel Printout
Reject H
0
0 6.61
Reject
o = .05
1, 2 n
F

2002 Prentice-Hall, Inc.



Chap 11-24
Tujuan dari Analisis Korelasi
Digunakan untuk mengukur kuatnya hubungan
(linear) antara 2 variabel.
Tidak ada hubungan kausal

Population correlation coefficient (Rho) digunakan
untuk mengukur kuatnya hubungan (linear) antara 2
variabel.
Sample correlation coefficient r adalah suatu
estimasi dari dan digunakan untuk mengukur
kuatnya hubungan (linear) pada sampel observasi


2002 Prentice-Hall, Inc.

Chap 11-25
Features of and r
Unit free
Range between -1 and 1
The closer to -1, the stronger the negative
linear relationship
The closer to 1, the stronger the positive
linear relationship
The closer to 0, the weaker the linear
relationship
2002 Prentice-Hall, Inc.

Chap 11-26
Test for a Linear Relationship
Hypotheses
H
0
: = 0 (tidak ada korelasi)
H
1
: = 0 (korelasi)
Test statistic


( )( )
( ) ( )
2
2
1
2 2
1 1
where
2
n
i i
i
n n
i i
i i
r
t
r
n
X X Y Y
r r
X X Y Y

=
= =

=
1


= =


2002 Prentice-Hall, Inc.

Chap 11-27
Example: Produce Stores
Reg ressi o n S tati sti cs
M u l t i p l e R 0 . 9 7 0 5 5 7 2
R S q u a r e 0 . 9 4 1 9 8 1 2 9
A d j u s t e d R S q u a r e 0 . 9 3 0 3 7 7 5 4
S t a n d a r d E r r o r 6 1 1 . 7 5 1 5 1 7
O b s e r va t i o n s 7
From Excel Printout
r
Is there any
evidence of a linear
relationship between
the annual sales of a
store and its square
footage at .05 level
of significance?
H
0
:

= 0 (No association)
H
1
: = 0 (Association)
o = .05
df = 7 - 2 = 5
2002 Prentice-Hall, Inc.

Chap 11-28


Example:
Produce Store Solution
0 2.5706 -2.5706
.025
Reject Reject
.025
Critical Value(s):
Conclusion:
There is evidence of a
linear relationship at 5%
level of significance
Decision:
Reject H
0
2
.9706
9.0099
1 .9420
5
2
r
t
r
n

= = =

The value of the t statistic is


exactly the same as the t
statistic value for test on the
slope coefficient
2002 Prentice-Hall, Inc.

Chap 11-29

0 1 1 2 2 i i i k ki i
Y b b X b X b X e = + + + + +
Population
Y-intercept
Population slopes Random
Error
The Multiple Regression Model
Relationship between 1 dependent & 2 or more
independent variables is a linear function
Dependent (Response)
variable for sample
Independent (Explanatory)
variables for sample model
1 2 i i i k ki i
Y X X X | | | | c
0 1 2
= + + + + +
Residual
2002 Prentice-Hall, Inc.

Chap 11-30
Oil (Gal) Temp Insulation D
i
275.30 40 3 0.0094
363.80 27 3 0.0098
164.30 40 10 0.0496
40.80 73 6 0.0041
94.30 64 6 0.0001
230.90 34 6 0.0295
366.70 9 6 0.1342
300.60 8 10 0.1328
237.80 23 10 0.0001
121.40 63 3 0.3083
31.40 65 10 0.1342
203.50 41 6 0.0094
441.10 21 3 0.4941
323.00 38 3 0.0824
52.50 58 10 0.0062
2002 Prentice-Hall, Inc.

Chap 11-31

Interpretation of Coefficient of
Multiple Determination


96.56% of the total variation in heating oil can be
explained by different temperature and amount of
insulation

95.99% of the total fluctuation in heating oil can
be explained by different temperature and amount
of insulation after adjusting for the number of
explanatory variables and sample size

2
,12
.9656
Y
SSR
r
SST
= =
2
adj
.9599 r =
2002 Prentice-Hall, Inc.

Chap 11-32

Coefficient of Multiple
Determination
Regressi on Stati sti cs
M u l t i p l e R 0 . 9 8 2 6 5 4 7 5 7
R S q u a re 0 . 9 6 5 6 1 0 3 7 1
A d j u s t e d R S q u a re 0 . 9 5 9 8 7 8 7 6 6
S t a n d a rd E rro r 2 6 . 0 1 3 7 8 3 2 3
O b s e rva t i o n s 1 5
Excel Output
SST
SSR
r
, Y
=
2
12
Adjusted r
2
reflects the number
of explanatory
variables and sample
size
is smaller than r
2
2002 Prentice-Hall, Inc.

Chap 11-33

Testing for Overall Significance
Shows if there is a linear relationship between
all of the X variables together and Y
Use F test statistic
Hypotheses:
H
0
: |
1
= |
2
= = |
k
= 0 (no linear relationship)
H
1
: at least one |
i
= 0 ( at least one independent
variable affects Y )
The null hypothesis is a very strong statement
Almost always reject the null hypothesis
2002 Prentice-Hall, Inc.

Chap 11-34

Test for Overall Significance
Example Solution
F 0 3.89
H
0
: |
1
= |
2
= = |
p
= 0
H
1
: At least one |
i
= 0
o = .05
df = 2 and 12
Critical Value(s):
Test Statistic:


Decision:

Conclusion:

Reject at o = 0.05
There is evidence that at
least one independent
variable affects Y
o = 0.05
F
=
168.47
(Excel Output)
2002 Prentice-Hall, Inc.

Chap 11-35

Test for Significance:
Individual Variables
Shows if there is a linear relationship between
the variable X
i
and Y
Use t test statistic
Hypotheses:
H
0
: |
i
= 0 (no linear relationship)
H
1
: |
i
= 0 (linear relationship between X
i
and Y)
2002 Prentice-Hall, Inc.

Chap 11-36

t Test Statistic
Excel Output: Example
Coefficients Standard Error t Stat
Intercept 562.1510092 21.09310433 26.65093769
X Variable 1 -5.436580588 0.336216167 -16.16989642
X Variable 2 -20.01232067 2.342505227 -8.543127434
t Test Statistic for X
1

(Temperature)
t Test Statistic for X
2

(Insulation)
i
i
b
b
t
S
=
2002 Prentice-Hall, Inc.

Chap 11-37

t Test : Example Solution
H
0
: |
1
= 0
H
1
: |
1
= 0
df = 12
Critical Value(s):

Test Statistic:

Decision:

Conclusion:

Reject H
0
at o = 0.05
There is evidence of a
significant effect of
temperature on oil
consumption.
t
0
2.1788 -2.1788
.025
Reject H
0
Reject H
0
.025
Does temperature have a significant effect on monthly
consumption of heating oil? Test at o = 0.05.
t Test Statistic = -16.1699

Вам также может понравиться