Professional Documents
Culture Documents
Tahun : 2010
Pertemuan 13
Data Deret Waktu dan Analisis
Regresi dan Korelasi Linier
Sederhana
1
Outline Materi :
2
PENDAHULUAN
• Data deret berkala adalah sekumpulan data yang dicatat
dalam suatu periode tertentu.
Y Y
8
Pelanggan (Jutaan)
7
Y = a + bX 6
5
4
a = Y/N 3
2
1
b = YX/X2 0
97 98 99 00 01
Tahun
5
5
CONTOH METODE KUADRAT TERKECIL
Nilai a = 30,6/5=6,12
Nilai b =5,5/10=0,55
Jadi persamaan trend Y’=6,12+0,55x
6
6
ANALISIS TREND KUADRATIS
Jumlah Pelanggan
8.00
bersifat linear. Metode
(jutaan)
6.00
kuadratis adalah contoh 4.00 Y=a+bX+c
X2
Tahun
Y = a + bX + cX2
Tahun Y X XY X2 X2Y X4
1997 5,0 -2 -10,00 4,00 20,00 16,00
1998 5,6 -1 -5,60 1,00 5,60 1,00
1999 6,1 0 0,00 0,00 0,00 0,00
2000 6,7 1 6,70 1,00 6,70 1,00
2001 7,2 2 14,40 4,00 2880 16,00
8
8
ANALISIS TREND EKSPONENSIAL
Y’ = a (1 + b)X
Trend Eskponensial
Ln Y’ = Ln a + X Ln (1+b) 15,00
Pelanggan
Sehingga a = anti ln (LnY)/n
(jutaan)
Jumlah
10,00
b = anti ln (X. LnY) - 1 5,00
(X)2 0,00
97 98 99 00 01
Tahun
Y= a(1+b)X 9
9
CONTOH TREND EKSPONENSIAL
Tahun Y X Ln Y X2 X Ln Y
150
2
20 100
Inflasi (%)
1,5
Indeks
10 1 50
0 0,5 0
I- II- III- I- II- III- I- II- III- I- II- III-
98 98 98 99 99 99 00 00 00 01 01 03
0 03 05 13 14 22
1 2 3 4 5 6 7 8 9 10 11 12
Triw ulan Tanggal
Bulan
13
13
METODE RATA-RATA DENGAN TREND
14
14
VARIASI SIKLUS
IHSG
Maka 0
-0,5 94 95 96 97 98 99 00 01 02
TCI = Y/S -1
CI = TCI/T -1,5
-2
Di mana CI adalah Indeks -2,5
Siklus Tahun
15
15
CONTOH SIKLUS
III 9 13,6
16
16
GERAK TAK BERATURAN
Siklus
Ingat Y = T x S x C x I
TCI = Y/S
CI = TCI/T
I = CI/C
17
17
GERAK TAK BERATURAN
1998 II 93 92 101
III 97 97 100
I 99 100 99
I 112
2001 II
III
18
18
PENGUJIAN KOEFISIEN
REGRESI DENGAN
ANALISIS VARIANSI
19
Measures of Variation:
The Sum of Squares
Y
SSE =(Yi - Yi )2
_
SST = (Yi - Y)2
_
SSR = (Yi - Y)2
_
Y
X
Xi
21
Venn Diagrams and
Explanatory Power of
Regression
Variations in Sales
Variations in explained by the
store Sizes not error term or
used in unexplained by
explaining Sales Sizes SSE
variation in
Sales Variations in Sales
explained by Sizes
Sizes or variations in Sizes
used in explaining
variation in Sales
SSR 22
The ANOVA Table in Excel
ANOVA
Significanc
df SS MS F e
F
Regressio SS MSR P-value of
k MSR/MSE
n R =SSR/k the F Test
MSE
n-k- SS
Residuals =SSE/(n-k-
1 E
1)
SS
Total n-1
T
23
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
r
2
Sales
Sizes
SSR
SSR SSE
25
Standard Error of Estimate
n
• 2
Y Yˆi
SSE
SYX i 1
n2 n2
26
Measures of Variation:
Produce Store Example
• Normality
– Y values are normally distributed for each X
– Probability distribution of error is normal
• Homoscedasticity (Constant Variance)
• Independence of Errors
28
Consequences of Violation
of the Assumptions
• Violation of the Assumptions
– Non-normality (error not normally distributed)
– Heteroscedasticity (variance not constant)
• Usually happens in cross-sectional data
– Autocorrelation (errors are not independent)
• Usually happens in time-series data
• Consequences of Any Violation of the Assumptions
– Predictions and estimations obtained from the
sample regression line will not be accurate
– Hypothesis testing results will not be reliable
• It is Important to Verify the Assumptions
29
Variation of Errors Around
the Regression Line
Y
X2
X1
X Sample Regression Line 30
Inference about the Slope:
t Test
• t Test for a Population Slope
– Is there a linear dependency of Y on X ?
• Null and Alternative Hypotheses
– H0: 1 = 0 (no linear dependency)
– H1: 1 0 (linear dependency)
• Test Statistic
– b1 1 SYX
t where Sb1
Sb1 n
(X
i 1
i X) 2
– d. f . n 2 31
Example: Produce Store
.05 Intercept
Coefficients Standard Error
1636.4147 451.4953
t Stat P-value
3.6244 0.01515
df 7 - 2 = 5 Footage 1.4866 0.1650 9.0099 0.00028
Critical Value(s): Decision:
Reject Reject Reject H0. p-value
.025 .025 Conclusion:
There is evidence that
-2.5706 0 2.5706 t square footage affects
annual sales. 33
Inferences about the Slope:
Confidence Interval Example
t
2
• n2 F1,n 2
• The p –value of a t Test and the p –value
of an F Test are Exactly the Same
• The Rejection Region of an F Test is
Always in the Upper Tail
36
Inferences about the Slope:
F Test Example
Test Statistic:
H0: 1 = 0 From Excel Printout
H1: 1 0 ANOVA
df SS MS F Significance F
.05 Regression 1 30380456.12 30380456.12 81.179 0.000281
numerator Residual 5 1871199.595 374239.919
df = 1 Total 6 32251655.71 p-value
denominator
df 7 - 2 = 5 Decision: Reject H0.
Reject
Conclusion:
= .05 There is evidence that
square footage affects
0 6.61 F1,n 2 annual sales. 37
Purpose of Correlation
Analysis
38
Purpose of Correlation
Analysis
39
Purpose of Correlation
Analysis
(continued)
• Sample Correlation Coefficient r is an
Estimate of and is Used to Measure the
Strength of the Linear Relationship in the
Sample Observations
X i X Yi Y
r i 1
n n
X X Y Y
2 2
i i
i 1 i 1
40
Sample Observations from
Various r Values
Y Y Y
X X X
r = -1 r = -.6 r=0
Y Y
X X 41
r = .6 r=1
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
42
t Test for Correlation
• Hypotheses
– H0: = 0 (no correlation)
– H1: 0 (correlation)
• Test Statistic
r
t where
r 2
– n2
n
X i X Yi Y
r r2 i 1
n n
X X Y Y
2 2
i i
i 1 i 1 43
Example: Produce Stores
Decision:
r .9706 Reject H0.
t 9.0099
r 2
1 .9420
Conclusion:
n2 5
There is evidence of a
Critical Value(s): linear relationship at 5%
level of significance.
Reject Reject
The value of the t statistic is
.025 .025
exactly the same as the t
statistic value for test on the
-2.5706 0 2.5706 slope coefficient.
45
Estimation of Mean Values
1 (Xi X ) 2
Yˆi tn2 SYX 1 n
(Xi X )
n 2
i 1 47
Interval Estimates for Different
Values of X
Confidence
Prediction Interval Interval for the
for a Individual Yi Mean of Y
Y
X
X a given X 48
Example: Produce Stores
1 ( X i X )2
Yˆi tn 2 SYX n 4610.45 612.66
(Xi X )
n 2
i 1
3997.02 Y |X X i 5222.34 50
Prediction Interval for Y :
Example
1 ( X i X )2
Yˆi tn 2 SYX 1 n 4610.45 1687.68
i
n
( X X ) 2
i 1
2922.00 YX X i 6297.37 51
PENGGUNAAN MS EXCEL UNTUK REGRESI
52
52
53
53
54
54
55
55
SELAMAT BELAJAR SEMOGA SUKSES SELALU
56
56