13 regresi linier dan korelasi

21
1 Pertemuan 13 Regresi Linear dan Korelasi Matakuliah : I0262 – Statistik Probabilitas Tahun : 2007 Versi : Revisi

Upload: sudahkuliah

Post on 18-Nov-2014

2.239 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: 13 Regresi Linier Dan Korelasi

1

Pertemuan 13Regresi Linear dan Korelasi

Matakuliah : I0262 – Statistik Probabilitas

Tahun : 2007

Versi : Revisi

Page 2: 13 Regresi Linier Dan Korelasi

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa

akan mampu :

• Mahasiswa akan dapat memilih statistik uji untuk koefisien regresi dan korelasi.

Page 3: 13 Regresi Linier Dan Korelasi

3

Outline Materi

• Pengujian koefisien regresi dengan analisis varians

• Inferensia tentang koefisien korelasi

Page 4: 13 Regresi Linier Dan Korelasi

4

Testing for Significance

• To test for a significant regression relationship, we must conduct a hypothesis test to determine whether the value of 1 is zero.

• Two tests are commonly used– t Test– F Test

• Both tests require an estimate of 2, the variance of in the regression model.

Page 5: 13 Regresi Linier Dan Korelasi

5

Testing for Significance

• An Estimate of 2

The mean square error (MSE) provides the estimate

of 2, and the notation s2 is also used.

s2 = MSE = SSE/(n-2)

where:

210

2 )()ˆ(SSE iiii xbbyyy 210

2 )()ˆ(SSE iiii xbbyyy

Page 6: 13 Regresi Linier Dan Korelasi

6

Testing for Significance

• An Estimate of – To estimate we take the square root of 2.– The resulting s is called the standard error of

the estimate.

2

SSEMSE

n

s2

SSEMSE

n

s

Page 7: 13 Regresi Linier Dan Korelasi

7

• Hypotheses

H0: 1 = 0

Ha: 1 = 0

• Test Statistic

• Rejection Rule

Reject H0 if t < -tor t > t

where t is based on a t distribution with

n - 2 degrees of freedom.

Testing for Significance: t Test

tbsb

1

1

tbsb

1

1

Page 8: 13 Regresi Linier Dan Korelasi

8

• t Test – Hypotheses H0: 1 = 0

Ha: 1 = 0

– Rejection Rule

For = .05 and d.f. = 3, t.025 = 3.182

Reject H0 if t > 3.182

– Test Statistics

t = 5/1.08 = 4.63– Conclusions

Reject H0

Contoh Soal: Reed Auto Sales

Page 9: 13 Regresi Linier Dan Korelasi

9

Confidence Interval for 1

• We can use a 95% confidence interval for 1 to test the hypotheses just used in the t test.

• H0 is rejected if the hypothesized value of 1 is not included in the confidence interval for 1.

Page 10: 13 Regresi Linier Dan Korelasi

10

Confidence Interval for 1

• The form of a confidence interval for 1 is:

where b1 is the point estimate

is the margin of error

is the t value providing an area

of /2 in the upper tail of a

t distribution with n - 2 degrees

of freedom

12/1 bstb 12/1 bstb

12/ bst 12/ bst2/t 2/t

Page 11: 13 Regresi Linier Dan Korelasi

11

Contoh Soal: Reed Auto Sales

• Rejection Rule

Reject H0 if 0 is not included in the confidence interval for 1.

• 95% Confidence Interval for 1

= 5 +- 3.182(1.08) = 5 +- 3.44

/ or 1.56 to 8.44/• Conclusion

Reject H0

12/1 bstb 12/1 bstb

Page 12: 13 Regresi Linier Dan Korelasi

12

Testing for Significance: Testing for Significance: FF Test Test

HypothesesHypotheses

HH00: : 11 = 0 = 0

HHaa: : 11 = 0 = 0 Test StatisticTest Statistic

FF = MSR/MSE = MSR/MSE Rejection RuleRejection Rule

Reject Reject HH00 if if FF > > FF

where where FF is based on an is based on an FF distribution with 1 distribution with 1 d.f. in d.f. in

the numerator and the numerator and nn - 2 d.f. in the - 2 d.f. in the denominator.denominator.

Page 13: 13 Regresi Linier Dan Korelasi

13

F F Test Test

• HypothesesHypotheses H H00: : 11 = 0 = 0

HHaa: : 11 = 0 = 0

• Rejection RuleRejection Rule

For For = .05 and d.f. = 1, 3: = .05 and d.f. = 1, 3: FF.05.05 = = 10.1310.13

Reject Reject HH00 if F > 10.13. if F > 10.13.

• Test StatisticTest Statistic

FF = MSR/MSE = 100/4.667 = 21.43 = MSR/MSE = 100/4.667 = 21.43

• ConclusionConclusion

We can reject We can reject HH00..

Example: Reed Auto SalesExample: Reed Auto Sales

Page 14: 13 Regresi Linier Dan Korelasi

14

Some Cautions about theInterpretation of Significance Tests

• Rejecting H0: 1 = 0 and concluding that the relationship between x and y is significant does not enable us to conclude that a cause-and-effect relationship is present between x and y.

• Just because we are able to reject H0: 1 = 0 and demonstrate statistical significance does not enable us to conclude that there is a linear relationship between x and y.

Page 15: 13 Regresi Linier Dan Korelasi

15

Confidence Interval Estimate of Confidence Interval Estimate of EE((yypp))

Prediction Interval Estimate of Prediction Interval Estimate of yypp

yypp ++ tt/2 /2 ssindind

where the confidence coefficient is 1 - where the confidence coefficient is 1 - and and

tt/2 /2 is based on ais based on a t t distribution with distribution with nn - 2 - 2 d.f.d.f.

Using the Estimated Regression Using the Estimated Regression EquationEquation

for Estimation and Predictionfor Estimation and Prediction

/ y t sp yp 2 / y t sp yp 2

Page 16: 13 Regresi Linier Dan Korelasi

16

• Point Estimation

If 3 TV ads are run prior to a sale, we expect the mean number of cars sold to be:

y = 10 + 5(3) = 25 cars

• Confidence Interval for E(yp)

95% confidence interval estimate of the mean number of cars sold when 3 TV ads are run is:

25 + 4.61 = 20.39 to 29.61 cars

• Prediction Interval for yp

95% prediction interval estimate of the number of cars sold in one particular week when 3 TV ads are run is: 25 + 8.28 = 16.72 to 33.28 cars

Contoh Soal: Reed Auto Sales

Page 17: 13 Regresi Linier Dan Korelasi

17

• Residual for Observation i

yi – yi

• Standardized Residual for Observation i

where:

Residual Analysis

^̂y ysi i

y yi i

y ysi i

y yi i

s s hy y ii i 1s s hy y ii i 1

Page 18: 13 Regresi Linier Dan Korelasi

18

Contoh Soal: Reed Auto Sales

• ResidualsObservation Predicted Cars Sold Residuals

1 15 -12 25 -13 20 -24 15 25 25 2

Observation Predicted Cars Sold Residuals1 15 -12 25 -13 20 -24 15 25 25 2

Page 19: 13 Regresi Linier Dan Korelasi

19

Contoh Soal: Reed Auto Sales

• Residual Plot

TV Ads Residual Plot

-3

-2

-1

0

1

2

3

0 1 2 3 4TV Ads

Re

sid

ua

ls

Page 20: 13 Regresi Linier Dan Korelasi

20

Residual Analysis• Detecting Outliers

– An outlier is an observation that is unusual in comparison with the other data.

– Minitab classifies an observation as an outlier if its standardized residual value is < -2 or > +2.

– This standardized residual rule sometimes fails to identify an unusually large observation as being an outlier.

– This rule’s shortcoming can be circumvented by using studentized deleted residuals.

– The |i th studentized deleted residual| will be larger than the |i th standardized residual|.

Page 21: 13 Regresi Linier Dan Korelasi

21

• Selamat Belajar Semoga Sukses.