You are on page 1of 2

Higher School of ‫ا‬ ‫ا‬ ‫ا‬ ‫ا ر ا ا‬

Management and People's Democratic Republic of Algeria


Digital Economy
‫ا‬ ‫وا‬ ‫ا‬ ‫وزارة ا‬
H.S.M.D.E Ministry of Higher Education and Scientific Research
 Level: 2nd 2nd cycle. | Academic Year: 2023-2024 |Teaching Team: Pr .L. SAMI & Dr.R. AZZAZ.

Data Analysis Serie No. 1: Principal Component Analysis (PCA)


Exercice 1
We are interested in the relationship between the cost of a bicycle tire and its wear resistance. Below,
we have data for 18 models:
Y (resistance) 6 13 10 11 10 9 8 7 8 11 8 7 14 7 2 10 9 4
X (cost) 4 8 8 9 10 10 2 3 10 11 11 14 8 15 7 11 11 5
Part I: Linear Regression and Correlation

1- Calculate , x ,y cov(X,Y), r(X,Y)


2- What conclusions can be drawn regarding the relationship between X and Y?
3- Plot the scatter plot of X and Y.
 What observations can you make from the plot?
 What type of correlation exists within each population?
 Compute the correlation coefficient for each population. ?
4- among the 18 tire models, can you identify the 5 models that are not bicycle tires?
Exercice 2
The table below presents three datasets: temperature X (°C), ice cream consumption (Tons), and the
recorded incidents of drowning Month 01 02 03 04 05 06 07 08 09 10 11 12
accidents in Oran province 0 1 0 2 7 17 32 40 15 2 1 0
throughout the year 2023: (T) 4.3 4.5 4.6 9 16 32 38 40 37 17 7 3.8
X(C°) 3 12 15 20 25 30 36 39 30 18 10 5
1- Fill out the following table: : cov(X, )=149.30 cov(X, )=131.31 cov( , )=167.65
2- Calculate ( , ), ∀(i = 1,2) and r( , )
Var(X)=129.02 Var( )=………. Var( )=199.87
3- What do you observe?
4- In your opinion, is there a causal relationship between
1)
et ? , provide your comments!

Exercice 3
Calculate the eigenvalues and eigenvectors of the following matrices:
Part II: Linear Algebra

5 −3 1 1
( , ) = , ( , ) = ……(complete this as homework)
6 −4 0 1
Exercice 4
Consider the following 10x3 matrix : 1

1
0
 Prove that = and = are eigenvalues of . Derive the third ⎛ 5 5 ⎞
1 1
= ⎜− 0⎟
eigenvalue and the associated eigenvectors. ⎜ 5 5 ⎟
4
⎝ 0 0
5⎠

Exercice 5
Consider the following data table:
Variables 1- Perform a centered (non-standardized) PCA of this table,
Part III: PCA

Individuals with a simultaneous representation of variables and


A 10 6 8
individuals on the plane of the first two axes. We have
B 6 11 10
C 12 13 8 been provided with: = 7.5 et = 6 as the first two
D 12 10 14 eigenvalues of the covariance matrix of V.
2- depict the supplementary individual E : 12 8 16

© H.S.M.D.E 2023 | Contact : Pr. L. SAMI: lsami@esgen.edu.dz , Dr.R. AZZAZ: arachid@esgen.edu.dz |


Exercice 6
Six students have achieved the following academic scores:
1) Perform a Standardized Principal Component Analysis Indi/Var English Math sciences
(PCA) and simultaneously visualize the students and their 1 9 12 10
scores on the plane of maximum inertia. 2 15 9 10
3 5 10 8
We are provided with : the eigenvectors : (1, −1, 0) and 4 11 13 14
(1, 1, 1 + 3) for the correlation matrix. 5 11 13 8
6 3 15 10
2) Interpret the results based on the graphical representations.

Exercice 7
We have gathered the results of 10-year-old children WISC CUB PUZ CAL MEM COM VOC
I1 5 5 4 0 1 1
on 6 subtests of the WISC (scores 0 to 5). I2 4 3 3 2 2 1
The observed variables are: I3 2 1 2 3 2 2
 CUB ( Kohs Cubes), I4 5 3 5 3 4 3
I5 4 4 3 2 3 2
 PUZ ( Object Assembly), I6 2 0 1 3 1 1
 CAL ( Mental Calculation),
Part III: Principal Component Analysis (PCA)

I7 3 3 4 2 4 4
 MEM ( Immediate Digit Recall), I8 1 2 1 4 3 3
I9 0 1 0 3 1 0
 COM ( Sentence Comprehension), I10 2 0 1 3 1 0
 VOC ( Vocabulary). I11 1 2 1 1 0 1
The observed protocol is as follows: I12 4 2 4 2 1 2
I13 3 2 3 3 2 3
These data are processed using a standardized I14 1 0 0 3 2 2
I15 2 1 1 2 3 2
Principal Component Analysis (PCA).
1. Complete the PCA results tables below and interpret the results.
Descriptive Stat Correlation Matrice (V)
Variable Moyenne Eca.type Var CUB PUZ CAL MEM COM VOC
CUB ……….. 1.55 CUB 1 0.7320 0.9207 -0.4491 0.3086 0.2735
PUZ 1.93 1.49 PUZ ……….. 1 0.7510 -0.6143 0.2814 0.2850
CAL 2.20 ……….. CAL 0.9207 0.7510 1 -0.3685 0.4077 0.4869
MEM 2.40 0.99 MEM -0.4491 ……….. -0.3685 1 0.3032 0.2023
COM 2.00 1.20 COM 0.3086 0.2814 0.4077 0.3032 ……….. 0.7819
VOC 1.80 1.15 VOC 0.2735 0.2850 0.4869 0.2023 0.7819 1
Bartlett's sphericity test Eigenvalues
Khi² (Observed) 60.2810 F1 F2 F3 F4 F5 F6
Chi-square (V.Critical) 24.9958 V. Propres 3.2581 ……… 0.4430 0.2538 0.1679 0.0400
p-value < 0.0001 Variability (%) 54.3020 ……… 7.3831 4.2292 2.7990 0.6673
Alpha ( significance level) 0.05 Cumulative % 54.30% ……… 92.30% 96.53% 99.33% 100.%
Variable Correlations / Axes
Var F1 F2
CUB 0.8970 -0.2018
PUZ 0.8652 -0.2883
CAL 0.9458 -0.0390
MEM -0.4449 0.7861
COM 0.5382 0.7627
VOC 0.5683 0.7156

_______________________________________________________________________

© H.S.M.D.E 2023 | Contact : Pr. L. SAMI: lsami@esgen.edu.dz , Dr.R. AZZAZ: arachid@esgen.edu.dz |

You might also like