Docsity

Final Project Group Work on Multivariate Analysis | STAT 924, Study notes of Descriptive statistics

Toggle sidebar
bg1
Stat 924 Final (Groupwork)
Name: Tianxu Chen
Workgroup Members: Jing jing Lu,Ping Shao
Problem 11.25
(a.) Use the formula on page 611:
ˆy0=(¯x1−¯x2)S−1
pooledx0
ˆm=1
2(¯x1−¯x2)S−1
pooledx0(¯x1+¯x2)
When we used all the data on variables X1and X2:
ˆm=−3.326732 1
Fisher’s linear function:
(¯x1−¯x2)S−1
pooled =[−4.826739,−1.477550]
ˆy0=−4.826739x1−1.477550x2
Decision rule:
Allocate x0to π1if ˆy0≥ˆm
Allocate x0to π2if ˆy0<ˆm
Using this rule, we classified all the sample observations. 2
We constructed the confusion matrix:
Confusion Matrix for all data
Predicted π1Predicted π2
Actual π119 2
Actual π2421
APER=0.13
1Please see the attached R code
2Please see page 2 of R code.
I
pf3
pf4
pf5

Partial preview of the text

Download Final Project Group Work on Multivariate Analysis | STAT 924 and more Study notes Descriptive statistics in PDF only on Docsity!

Stat 924 Final (Groupwork)

Name: Tianxu Chen Workgroup Members: Jingjing Lu,Ping Shao

Problem 11.

(a.) Use the formula on page 611:

yˆ 0 = (x¯ 1 − ¯x 2 )′S−pooled^1 x 0

m ˆ = 12 (¯x 1 − ¯x 2 )′S−pooled^1 x 0 (¯x 1 + ¯x 2 )

When we used all the data on variables X 1 and X 2 :

mˆ = − 3. 326732 1

Fisher’s linear function:

(x¯ 1 − x¯ 2 )′S−pooled^1 = [− 4. 826739 , − 1 .477550]

yˆ 0 = − 4. 826739 x 1 − 1. 477550 x 2

Decision rule:

Allocate x 0 to π 1 if ˆy 0 ≥ mˆ

Allocate x 0 to π 2 if ˆy 0 < mˆ

Using this rule, we classified all the sample observations. 2

We constructed the confusion matrix:

Confusion Matrix for all data Predicted π 1 Predicted π 2 Actual π 1 19 2 Actual π 2 4 21

APER=0.

(^1) Please see the attached R code (^2) Please see page 2 of R code.

I

In fig 1, we plotted the data and dicriminant line in the (x 1 , x 3 ) coordinate system:

−0.6 −0.4 −0.2 0.0 0.2 0.4 0.

1

2

3

4

5

Fig1. All data classified

x1=CF/TD

x3=CA/CL

P

P

Population Population

−10 −8 −6 −4 −2 0 2

−0.

−0.

Fig2: Projection − All observations classified

Classification after projection

m^

P2 P

Population1Population

We also projected the observations in fig2. The projection presented the statistical distances of the observations from the discriminant rule and the number of misclassifications.

(b.) First we calculated the Fisher’s linear discriminant function with observation 16 from backrupt firms dropped.

mˆ = − 3. 303918 3

Fisher’s linear function:

(x¯ 1 − x¯ 2 )′S−pooled^1 = [− 5. 973101 , − 1 .462552]

yˆ 0 = − 5. 973101 x 1 − 1. 462552 x 2

Decision rule 2:

Allocate x 0 to π 1 if ˆy 0 ≥ mˆ

Allocate x 0 to π 2 if ˆy 0 < mˆ

Using this rule, we classified sample observations with No.16 from bankrupt firms dropped.^4 (^3) Please see the attached R code (^4) Please see R code.

II

yˆ 0 = − 4. 379601 x 1 − 1. 969439 x 2

Decision rule 3:

Allocate x 0 to π 1 if ˆy 0 ≥ mˆ

Allocate x 0 to π 2 if ˆy 0 < mˆ

Using this rule, we classified sample observations with No.13 from nonbankrupt firms dropped. 6

We constructed the confusion matrix:

Confusion Matrix Predicted π 1 Predicted π 2 Actual π 1 20 1 Actual π 2 3 21

APER=0.

In fig 5, we plotted the data and dicriminant line in the (x 1 , x 3 ) coordinate system:

−0.6 −0.4 −0.2 0.0 0.2 0.4 0.

1

2

3

4

5

Fig5 Data classified with observation 13 from P2 dropped

x1=CF/TD

x3=CA/CL

P

P

Population Population

−10 −5 0

−0.

−0.

Fig6. Projection − data classified with Observation 13 from P2 dropped

Classification after projection

m^

Population1Population

P2 P

(^6) Please see R code.

IV

We also plotted projections of sample observations with No.13 from nonbankrupt firms dropped.

Analysis of influential observations As required by the problem, we used X 1 and X 3 as vari- ables to conduct discriminant analysis. Supported by preceding calculations, we are now able to analyze the influence of observation No.16 from bankruptcy firms and observation No. from nonbankrupt firms on the outcome of discriminant analysis.

−0.6 −0.4 −0.2 0.0 0.2 0.4 0.

1

2

3

4

5

Fig7. All data classified with different rules

x1=CF/TD

x3=CA/CL

Population1Population

Rule 1Rule 2 Rule 3

−0.6 −0.4 −0.2 0.0 0.2 0.4 0.

1

2

3

4

5

Fig8 Data classified with different rules

x1=CF/TD

x3=CA/CL

1

2 3

(^54)

6

(^108 )

11

12

13

14

15 16 17 18 (^2119 )

1 2

3

4

5

6

7 8

9 10

11

12

13

14 1516 17

18

19

20

21

22

23 24

25

Population1Population

Rule 1Rule 2 Rule 3

As suggested by fig7 and fig8, the above-mentioned two influential observations have in- fluenced results of discriminant analysis. Take observation 19 from population2 in fig8 for intance. The first dicriminant rule misclassfied it to population 1, but when we used the third discriminant rule where we dropped one influential observation from population 2, we correctly classified it to population 2.

Particularly, from figure 8 we can see that Observation No. 16 of population 1 (black dot numbered 16) and Observation No. 13 of population 2 (white dot numbered 13), were both wrongly predicted, and exceeded the discriminant line further into the wrong population than other observations in the same population, respectively. This may suggest that these two observations could be “problematic.”

To observe their influence more closely, we dropped observation No.16 from bankruptcy firms, and found that the discriminant line moved clockwise and APER changed from 6/46 to 5/45. On the other hand, however, when we dropped observation No.13 from nonbnkrupt firms, the discriminant line moved counterclockwise and APER changed from 6/46 to 4/45. That is, in both cases where we dropped influential observations, we got better APER ratio, suggesting that we might have more accurately classified the observations. Nevertheless,we should have in mind that we did not take into account the dropped observations when we calculated APER.

V