Inferensia dalam Regresi Linear Sederhana Pertemuan 20 – Teori Statistika II Matakuliah

advertisement
Matakuliah
Tahun
: I0184 – Teori Statistika II
: 2009
Inferensia dalam Regresi Linear Sederhana
Pertemuan 20
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa akan dapat menghitung dugaan parameter
regresi sederhana, korelasi dan menguji keberartiannya.
Bina Nusantara University
22
Outline Materi
•
•
•
•
•
Estimasi koefisien regresi
Inferensia parameter regresi
Koefisien korelasi
Koefisien determinasi
Inferesia koefisien korelasi
Bina Nusantara University
33
Persamaan Regresi
• Persamaan matematika yang memungkinkan kita meramalkan nilainilai peubah tak bebas dari nilai-nilai satu atau lebih peubah bebas
disebut Persamaan Regresi
• Persamaan Regresi Sederhana:
ˆ  a  bx
Y
 n  n 
  x   y 
n 

i 
i


n
i

1
i

1




  x - x  y - y   x y 
 i
 i

i i
n
i

1
i

1
b

n 
2
2

n


  x - x 
x
 i

i 1
n 2  i  1 i 
 xi 
n
i1
Bina Nusantara University
dan
a  y - bx
44
Testing for Significance
• To test for a significant regression relationship, we must
conduct a hypothesis test to determine whether the
value of b1 is zero.
• Two tests are commonly used
– t Test
– F Test
• Both tests require an estimate of s 2, the variance of e in
the regression model.
Bina Nusantara University
55
Testing for Significance
• An Estimate of s 2
The mean square error (MSE) provides the estimate
of s 2, and the notation s2 is also used.
s2 = MSE = SSE/(n-2)
where:
Bina Nusantara University
SSE   (yi  yˆi ) 2   ( yi  b0  b1 xi ) 2
66
Testing for Significance
• An Estimate of s
– To estimate s we take the square root of s 2.
– The resulting s is called the standard error of the
estimate.
SSE
s  MSE 
n2
Bina Nusantara University
77
Testing for Significance: t Test
• Hypotheses
• Test Statistic
H0: b1 = 0
H :bb = 0
t a 11
sb1
• Rejection Rule
Reject H0 if t < -t or t > t
Bina Nusantara University
where t is based on a t distribution with
n - 2 degrees of freedom.
88
Contoh Soal: Reed Auto Sales
• t Test
– Hypotheses
H 0: b1 = 0
Ha: b1 = 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
Bina Nusantara University
99
Confidence Interval for b1
• We can use a 95% confidence interval for b1 to test
the hypotheses just used in the t test.
• H0 is rejected if the hypothesized value of b1 is not
included in the confidence interval for b1.
Bina Nusantara University
1010
Confidence Interval for b1
• The form of a confidence interval for b1 is:
b1  t / 2 sb1
where
Bina Nusantara University
b1 is the point estimate
t / 2 sb1 is the margin of error
t / 2 is the t value providing an area
of /2 in the upper tail of a
t distribution with n - 2 degrees
of freedom
1111
Contoh Soal: Reed Auto Sales
b t s
• Rejection Rule
1
 / 2 b1
Reject H0 if 0 is not included in the confidence interval for b1.
• 95% Confidence Interval for b1
= 5 +- 3.182(1.08) = 5 +- 3.44
/
or 1.56 to 8.44/
• Conclusion
Reject H0
Bina Nusantara University
1212
Testing for Significance: F Test

Hypotheses
H0:
Ha:

=0
1 = 0
1
Test Statistic
F = MSR/MSE

Rejection Rule
Reject H0 if F > F
where F is based on an F distribution with 1 d.f. in
the numerator and n - 2 d.f. in the denominator.
Bina Nusantara University
1313
Example: Reed Auto Sales

F Test
• Hypotheses
• Rejection Rule
H 0 : b1 = 0
H a : b1 = 0
For  = .05 and d.f. = 1, 3: F.05 = 10.13
Reject H0 if F > 10.13.
• Test Statistic
F = MSR/MSE = 100/4.667 = 21.43
• Conclusion
We can reject H0.
Bina Nusantara University
1414
Some Cautions about the
Interpretation of Significance Tests
• Rejecting H0: b1 = 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: b1 = 0 and
demonstrate statistical significance does not enable us
to conclude that there is a linear relationship between x
and y.
Bina Nusantara University
1515
Using the Estimated Regression Equation
for Estimation and Prediction

Confidence Interval Estimate of E(yp)
y p  t /2 s y p

Prediction Interval Estimate of yp
yp + t /2 sind
where the confidence coefficient is 1 -  and
t/2 is based on a t distribution with n - 2 d.f.
Bina Nusantara University
1616
Contoh Soal: Reed Auto Sales
•
•
•
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
Bina Nusantara University
1717
Residual Analysis
• Residual for Observation i
yi – yi
• Standardized Residual for Observation i
where:
y^i  y^i
sy^i  y^i
syi  yi  s 1  hi
Bina Nusantara University
1818
Contoh Soal: Reed Auto Sales
• Residuals
Observation
1
2
3
4
5
Bina Nusantara University
Predicted Cars Sold
15
25
20
15
25
Residuals
-1
-1
-2
2
2
1919
Contoh Soal: Reed Auto Sales
• Residual Plot
TV Ads Residual Plot
3
Residuals
2
1
0
-1
-2
-3
0
1
2
3
4
TV Ads
Bina Nusantara University
2020
• Selamat Belajar Semoga Sukses.
Bina Nusantara University
2121
Download