Академический Документы
Профессиональный Документы
Культура Документы
Week 11-14
Learning Outcomes
LO 1 : Apply statistical method to the real problem
LO 2 : Use proper statistical method to the real
problem
LO 3 : Use statistical software to conduct analysis
LO 4 : Interpret the results of output software and
statistics calculation
LO 5 : Explain the suitable decision from statistical
method solution
(1) Correlation Analysis
(1) Correlation Analysis
1.1 Definition
Variable Variable
1 2
x x
y y
x x
Bina Nusantara University 6
(1) Correlation Analysis
No relationship x
x
Bina Nusantara University 7
(1) Correlation Analysis
x x x
r = -1 r = -0.6 r=0
y y
x x
r = +0.3 r = +1
( x x )( y
i i y)
rxy i 1
n n
2
( xi x ) ( yi y )
2
i 1 i 1
r = Sample correlation coefficient
n = Sample size
x = first variable
y = second variable
Bina Nusantara University 11
(1) Correlation Analysis
1.3 Testing a Correlation
Hypothesis Test Statistic Critical
Values
H0:
t t ,n 2
H1 : <
r n2
H0 : t
1 r 2 t t ,n 2
H 1 : >
Example 1
Example 1
( x x )( y y )
i i
rxy i 1
n 2
n
2
i ( x x ) i ( y y )
i 1 i 1
2840
rxy 0,95
(568)(15730)
Bina Nusantara University 15
(2) The Simple Linear Regression
Model
(2) The Simple Linear Regression Model
2.1 Modeling
Independent Dependent
variable variable
Independent Dependent
variable variable
Example 2
Example 2
Model :
Predict : 201.7
Impact : Yes
Where
x = independent variable
y = dependent variable
n = number of data
y β 0 β1x ε
Variable
x x
Linear relationships Nonlinear relationships
y y
x x
Bina Nusantara University 27
(2) The Simple Linear Regression Model
2.6 Estimation
y β 0 β1x ε
28
Bina Nusantara University
(2) The Simple Linear Regression Model
Estimated
Estimated (or Estimate of the Estimate of the
predicted) y regression regression slope
value intercept
Independent
ˆ ˆ
ŷ 0 1x
variable
29
Bina Nusantara University
(2) The Simple Linear Regression Model
S xy x i x yi y
ˆ1 i 1
n
S xx
x x
2
i
i 1
ˆo y ˆ1 x
30
Bina Nusantara University
(2) The Simple Linear Regression Model
Estimation of variance
n
y i yˆ i
2
ˆ
2 i 1
n2
31
Bina Nusantara University
(2) The Simple Linear Regression Model
2.7 Coefficient Determination
2
R , the coefficient of determination of the regression
line is defined as the proportion of the total sample
variability in the Y ’s explained by the regression model
R r 2 2
xy
R rxy
32
Bina Nusantara University
(2) The Simple Linear Regression Model
Example 3
33
Bina Nusantara University
(2) The Simple Linear Regression Model
Example 3
Scatterplot
34
Bina Nusantara University
(2) The Simple Linear Regression Model
Example 3
35
Bina Nusantara University
(2) The Simple Linear Regression Model
Example 3
n
x i x yi y
2840
ˆ1 i 1
n
5
568
ix x 2
i 1
yˆ 60 5 x
36
Bina Nusantara University
(2) The Simple Linear Regression Model
Example 3
yˆ 60 5 x
37
Bina Nusantara University
(3) Inference on the Parameter
(3) Inference on the Parameter
3.1 Parameter 1
Critical value :
t t / 2,n 2
40
Bina Nusantara University
(3) Inference on the Parameter
Example 4
t t t 2,308
Critical value : 5% / 2 , 8
Conclusion : Reject H0
41
Bina Nusantara University
(3) Inference on the Parameter
3.2 Regression Line
42
Bina Nusantara University
(3) Inference on the Parameter
43
Bina Nusantara University
(3) Inference on the Parameter
Prediction Interval
for an individual y,
y given xp
Confidence
Interval for
+ b x the mean of
y = b0
1
y, given xp
x
x
Bina Nusantara University xp 44
(4) The Analysis of Variance Table
(4) The Analysis of Variance Table
4.1 Definition
- Hypothesis :
H 0 : 1 0
H 1 : 1 0
- Test statistics :
47
Bina Nusantara University
(4) The Analysis of Variance Table
4.3 ANOVA Table
48
Bina Nusantara University
(4) The Analysis of Variance Table
n
SST yi y
2
i 1
n
SSE yi yˆ i
2
i 1
n
SSR yˆ i y
2
i 1
49
Bina Nusantara University
(4) The Analysis of Variance Table
4.4 The Sum of Squares for a Simple Linear Regression
50
Bina Nusantara University
(4) The Analysis of Variance Table
51
Bina Nusantara University
(4) The Analysis of Variance Table
52
Bina Nusantara University
(4) The Analysis of Variance Table
Example 5
53
Bina Nusantara University
(5) Multiple Linear Regression
(5) Introduction and Example
5.1 Multiple Linear Regression
y β 0 β1x1 β 2 x 2 .... β p x p ε
Bina Nusantara University 55
(5) Introduction and Example
Independent
variable (x1)
Independent Dependent
variable (x2) variable (y)
…….
Independent
variable (xp)
Example 1
Model :
y β 0 β1x1 β 2 x 2 .... β p x p ε
Matrix
Y Xβ ε
Bina Nusantara University 60
(6) Matrix Algebra and Formulation
Matrix :
1 x11 x12 x1 p y1 0 e1
1 x
x22 x2 p y2
1
X
21
Y β e2
e
.... ... ....
1 xn1 xn 2 x np yn p en
Parameter estimation of β1 , β1 , …, βp
β̂ X' X X' Y
1
Where,
n n n
x1i x2 i
n
n ... x
ki
i y
n
i 1
n n
i 1
n
i 1
ni 1
x1i xki
x1i
i 1
1i
x 2
i 1
x
i 1
x
1i 2 i ...
i 1
y x
i 1i
i 1
X'X n n n n X 'Y n
x2 i
i 1
x1i x2i
i 1
2i
x 2
i 1
...
i 1
x1i xki
yi x 2 i
i 1
... ... ... ... ... ...
n n n n
2
n
x ki x 1i kix x x
2 i ki ... xki yi xki
i 1 i 1 i 1 i 1 i 1
Example
Example
Example
β̂ X' X X' Y
1
n n n
SST yi y SSE yi yi SSR yi y
2 2 2
ˆ ˆ
i 1 i 1 i 1
a. Multicolinearity
b. Residual Analysis
c. Influential Points
Analysis of Variance
Source DF SS MS F P
Regression 1 2,5419 2,5419 156,56 0,000
Residual Error 7 0,1136 0,0162
Total 8 2,6556
Unusual Observations
Analysis of Variance
Source DF SS MS F P
Regression 3 12833,9 4278,0 57,87 0,000
Residual Error 25 1848,1 73,9
Total 28 14681,9
Source DF Seq SS
East 1 153,8
South 1 349,5
North 1 12330,6
Exercises
(1)