12 regresi linier dan korelasi
TRANSCRIPT
1
Pertemuan 12Regresi Linear dan Korelasi
Matakuliah : I0262 – Statistik Probabilitas
Tahun : 2007
Versi : Revisi
2
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa akan dapat menghasilkan persamaan regresi dugaan untuk peramalan.
3
Outline Materi
• Konsep dasar : regresi dan korelasi
• Metode kuadrat terkecil
• Inferensia koefisien regresi dan ramalan
4
Simple Linear Regression
• Simple Linear Regression Model• Least Squares Method • Coefficient of Determination• Model Assumptions• Testing for Significance• Using the Estimated Regression Equation
for Estimation and Prediction• Computer Solution• Residual Analysis: Validating Model Assumptions• Residual Analysis: Outliers and Influential Observations
5
The Simple Linear Regression Model
• Simple Linear Regression Model
y = 0 + 1x +
• Simple Linear Regression Equation
E(y) = 0 + 1x
• Estimated Simple Linear Regression Equation
y = b0 + b1x
^̂
6
Least Squares Method
• Least Squares Criterion
where:
yi = observed value of the dependent variable
for the ith observation
yi = estimated value of the dependent variable
for the ith observation
min (y yi i )2min (y yi i )2
^̂
7
• Slope for the Estimated Regression Equation
• y-Intercept for the Estimated Regression Equation
b0 = y - b1xwhere:
xi = value of independent variable for ith observation
yi = value of dependent variable for ith observation x = mean value for independent variable
y = mean value for dependent variable n = total number of observations
________
bx y x y n
x x ni i i i
i i1 2 2
( )/
( ) /b
x y x y n
x x ni i i i
i i1 2 2
( )/
( ) /
____
The Least Squares Method
8
Contoh Soal: Reed Auto Sales• Simple Linear Regression
Reed Auto periodically has a special week-long sale. As part of the advertising campaign Reed runs one or more television commercials during the weekend preceding the sale. Data from a sample of 5 previous sales are shown below.
Number of TV Ads Number of Cars Sold1 143 242 181 173 27
9
• Slope for the Estimated Regression Equation
b1 = 220 - (10)(100)/5 = 5
24 - (10)2/5
• y-Intercept for the Estimated Regression Equation
b0 = 20 - 5(2) = 10
• Estimated Regression Equation
y = 10 + 5x^̂
Contoh Soal: Reed Auto Sales
10
Contoh Soal: Reed Auto Sales
• Scatter Diagram
y = 5x + 10
0
5
10
15
20
25
30
0 1 2 3 4TV Ads
Ca
rs S
old
11
The Coefficient of Determination
• Relationship Among SST, SSR, SSE
SST = SSR + SSE
• Coefficient of Determination
r2 = SSR/SST
where:
SST = total sum of squares
SSR = sum of squares due to regression
SSE = sum of squares due to error
( ) ( ) ( )y y y y y yi i i i 2 2 2( ) ( ) ( )y y y y y yi i i i 2 2 2^̂^̂
12
• Coefficient of Determination
r2 = SSR/SST = 100/114 = .8772
The regression relationship is very strong since 88% of the variation in number of cars sold can be explained by the linear relationship between the number of TV ads and the number of cars sold.
Contoh Soal: Reed Auto Sales
13
The Correlation Coefficient
• Sample Correlation Coefficient
where:
b1 = the slope of the estimated regression
equation
21 ) of(sign rbrxy 21 ) of(sign rbrxy
ionDeterminat oft Coefficien ) of(sign 1brxy ionDeterminat oft Coefficien ) of(sign 1brxy
xbby 10ˆ xbby 10ˆ
14
Contoh Soal: Reed Auto Sales
• Sample Correlation Coefficient
The sign of b1 in the equation is “+”.
rxy = +.9366
21 ) of(sign rbrxy 21 ) of(sign rbrxy
ˆ 10 5y x ˆ 10 5y x
=+ .8772xyr =+ .8772xyr
15
Model Assumptions
• Assumptions About the Error Term – The error is a random variable with mean of
zero.– The variance of , denoted by 2, is the
same for all values of the independent variable.
– The values of are independent.– The error is a normally distributed random
variable.
16
• Selamat Belajar Semoga Sukses.