Вы находитесь на странице: 1из 60

CORRELATION

Learning Outcomes
Upon completion of this chapter, you should be able to:
Construct a scatter diagram given two sets of data
Interpret a given scatter plot in terms of strength of
relationship and direction of relationships
Decide whether the relationship between two sets of
data is linear/non-linear given the scatter diagram
Calculate earson correlation given the data
Calculate !pearman correlation given the data
Interpret given correlation coefficient
Decide on whether to use earson or !pearman
correlation given the data sets
Correlation
A correlation is showing the degree or strength of
relationship between two variables.
"he population correlation, denoted by
"he sample correlation, denoted by r
Usually, the variables denoted by # and $%
&r' can ta(e on any value from ) to )%
Three method can be used for the describe the
relation and estimating association between
variables
a) Scatter plot
b) Pearsons Correlation Coefficient
c) Spearmans Rank Correlation Coefficient
Scatter Plot / Diagram
!catter plots usually consist of a large body of data%
"he closer the data points come when plotted to ma(ing
a straight line, the higher the correlation between the
two variables, or the stronger the relationship%
In a positive linear relationship indicates that as the #
score increase, the $ also tend to increase%
Cont..
In a negative linear relationship indicates that as the #
score increases, the $ score tend to decreases%
In a nonlinear relationship denotes that as the # scores
increases, the $ score do not increases nor decreases%
erfect positive !trong positive ositive
correlation r * ) correlation r * +%,, correlation r * +%-+
!trong negative .o correlation .on-linear
correlation r * +%++
correlation r * -+%,-
Strength of Relationship
r Relationship Between Two Variables
r * -)%++ indicates a perfect negative linear relationship
r * /)%++ indicates a perfect positive linear relationship
-)%++ 0 r 0 -+%1+ indicates a strong negative linear relationship
/+%1+ 0 r 0
/)%++
indicates a strong positive linear relationship
-+%1+ 0 r 0 + indicates a wea( negative linear relationship
+ 0 r 0 /+%1+ indicates a wea( positive linear relationship
r * + indicates no linear relationship
The important of a scatter plot
We need a scatter plot to find if the
relationship between # and $ is a linear
relationship%
It can be positive linear relationship or
negative linear relationship%
Perkara Penting Untuk Melakar
Scatter Diagram
2engenal pasti pembolehubah bersandar dan
pembolehubah tida( bersandar
2ela(ar scatter diagram
"a3u( 4raf
5abel a(si #
5abel a(si $
lot !era(an
Pearsons correlation coefficient ( r)
Definition
Pearsons correlation coefficient measures the strength or the
degree of the linear relationship between two variables.
It is assumed that both variables (often called X and Y) are of
interval or ratio scale.
Data set approximately normally distribute.
Synonyms:
product moment correlation coefficient
simple linear correlation coefficient
Cont
Pearsons Correlation Coefficient is usuall signified b r
!rho" ).
#ormula for computing Pearson correlation is given as:-


) )( (

Y N Y X N X
Y X N XY
r
Y x
SS SS
SP
r
$here%

X
&ean of '

Y
&ean of (
) number of sample



) ) ( ( ) ) ( (
) )( (

Y Y N X X N
Y X XY N
r
p
Spearman ran"
#ormally
distributed
$ida"
Ya
Pearson
%orrelation
Interval&ratio
data'
(ula
$amat
$ida"
Ya
How to choose the Correlation ? How to choose the Correlation ?
Cont
Example 1
A high school guidance is interested in a relationship between pro*imit
to school and participation in e*tracurricular activities. +e collects the
data on the distance from home to school !in miles) and number of
clubs ,oined for a sample of -. ,uniors. /sing the following data
compute a Pearsons correlation is significant.
Distance to
school (in miles)
X
Numbers of clubs
Joined
Y
5ee 6 7
8honda 9 )
:ess ; 1
<velyn ) 9
2ohammad 6 )
!teve = )
4eorge , ,
:uan ; =
Chi ; 1
David )+ -
Penelesaian
!tep )
!tep 9
84 . )
) * . +8 ( , . +-
. . -/
) , . 4 )( ,) ( 4+ )( + . / )( ,) ( 4), (
) , . 4 )( + . / )( ,) ( **

p
p
p
r
r
r
Interpretation
#ilai pe"ali "orelasi Pearson 0).84 1 menun2u""an terdapatnya satu hubungan
linear positif diantara 2ara" dari se"olah dengan bilangan penyertaan dalam
"elab.


) )( (

Y N Y X N X
Y X N XY
r
Pearsons Coefficient Correlation Test
earson>s Coefficient correlation test can be determine
by using critical value from earson?s "able or "-test%
"o test the significant of a a measure of correlation, we
usually set up that
) 3
) 3

a
o
H
H
)ull hpothesis
Alternative hpothesis
4 )
5 )
0egree of freedom" df 1 n23

3
p
p
r
n
r T ujian statistik

Contoh soalan 3
daripada contoh -" u,i keertian pekali korelasi Pearson
dengan aras keertian" 41...5.
5ang(ah ): Nyatakan H
o
dan H
a
)ilai korelasi adalah positif !6..78)" maka u,ian
hipotesis satu hu,ung digunakan.
@
o
: "ida( terdapat per(aitan antara 3ara( dari se(olah
dengan penglibatan dalam a(tiviti (elab
@
o
:
s
= +
@
a
: "erdapat per(aitan antara 3ara( dari se(olah dengan
penglibatan dalam a(tiviti (elab%
@
a
:
s
> +
p
r
p
r
Aeputusan u3ian:
0ar,ah kebebasan
d# 1 n23
1 -.23
17
Compare the obtained Pearsons with the appropriate value of
Pearsons in Table #
Cari dengan menggunakan ,adual nilai kritikal
Pearsons
critical
r
0aripada ,adual didapati bahawa
maka" null hpotesis ditolak dan mempunai bukti ang
kukuh untuk membuat kesimpulan bahawa
9esimpulan" ini menun,ukkan bahawa wu,udna
hubungan ang signifikan pada aras signifikan ...5 iaitu
,ika ,arak dari sekolah ,auh" penglibatan dalam aktiviti
kelab meningkat.
critical p
r r
)
p
r
Contoh soalan : !menggunakan u,ian T)

3
p
p
r
n
r T ujian statistik

.+8 . 4
84 . ) ,
8
84 . )

T
T
0aripada ,adual T" pada aras signifikan 41...5" T ; t
...5" 7
1 -.7<
maka hipotesis null ditolak .
9esimpulanna" terdapat hubungan ang signifikan antara ,arak
dari sekolah dengan penglibatan dalam aktiviti kelab.
r
p
= pekali korelasi Pearson
n 1 sai= sampel
Cont>
!eorang guru ingin membu(ti(an (epada para pela3ar (eburu((an
bermain (omputer dalam prestasi pela3aran mere(a% 4uru tersebut
percaya bahawa lebih banya( masa &3am seminggu' yang diguna(an
oleh pela3ar untu( bermain (omputer lebih rendah mar(ah
peperi(saan mere(a% !atu sampel rawa( sebanya( )+ orang pela3ar
diambil untu( mendapat(an data% Data adalah seperti beri(ut%
Masa (jam
seminggu)
4 10 14 12 4 5 8 11 13 15
&arkah
peperiksaan
3< -? ? -3 :. 8. 3. -5 -. 5
X Y XY
8 3< -.8 -< <?<
-. -? -?. -.. :7@
-8 ? @7 -@< 8@
-3 -3 -88 -88 -88
8 :. -3. -< @..
5 8. 3.. 35 -<..
7 3. -<. <8 8..
-- -5 -<5 -3- 335
-: -. -:. -<@ -..
-5 5 ?5 335 35

*- X

,8 Y

,.-- XY

,)+-

X
44)8

Y
r
p
1
-. !-::<) A @< !-73)
,) (,)+-) 6 (*-)7 ,) (44)8) 6 (,8)7
r
p
8 9 ).*+
#ilai pe"ali "orelasi Pearson 9).*+ menun2u""an
terdapatnya satu hubungan linear negatif yang "uat di
antara masa yang diguna"an untu" bermain "omputer
dan prestasi pela2ar. (a"a1 "ita boleh membuat
"esimpulan bahawa 2i"a pela2ar mengguna"an masa
yang banya" bermain "omputer1 ia a"an men2e2as"an
pela2aran mere"a.
U2ian :eertian Pe"ali :orelasi Pearson
Langkah -% Nyatakan H
o
dan H
a
+
o
% Tidak terdapat perkaitan antara masa bermain
komputer dengan markah peperiksaan.
+
o
%
s
= .
+
a
% Terdapat perkaitan antara masa bermain komputer
dengan markah peperiksaan.
+
a
%
s
< .
Significant level1 ;8).)/

3
p
p
r
n
r T ujian statistik

** . -
*+ . ) ,
8
*+ . )


T
T
0aripada ,adual T" pada aras signifikan 41...5" T ; t
...5" 7
12-.7<
maka hipotesis null ditolak .
Bni menun,ukkan bahawa wu,udna hubungan ang signifikan pada
aras signifikan 41...5" iaitu ,ika seorang pela,ar menggunakan banak
masa untuk bermain komputer" maka masa untuk mengulangka,i adalah
kurang dan menebabkan prestasi pela,aran mereka merosot.
r
p
= pekali korelasi Pearson
n 1 sai= sampel
Spearman Rank Correlation
Coefficient Test
Introduction
It is used to compute the degree or strength of
the linear relationship between two variables
&can be seen from the scatter diagram' is not
normal &non parametric' , or data is in ordinal
level%
It is also used when the data are at the
interval/ratio but not normally distributed%
Denoted by for sample data and s for
population data%
s
r
Theory
"he ran( representation of variable X is denoted
by symbol U
"he ran( representation of variable Y is denoted
by symbol V
Simplified Formula
Where,
d * u B v &difference between each pair of
ran(s'
n * number of pairs
) , (
-
,



n n
d
r
s
Example 1
"he mar(s for a random sample of eight
candidates in <nglish and 2athematics are:
8an( the results and hence find !pearman?s
ran( correlation coefficient between the two sets
of mar(s% Comment on the value obtained%
Candidate 1 2 3 4 5 6 7 8
English (x) 50 58 35 86 76 43 40 60
Maths (y) 65 72 54 82 32 74 40 53
Solution
Eng (x)
Rank
(u)
Maths
(y)
Rank
(v)
d = u - v d
2
50
4
65 5 -1 1
58
5 72
6 -1 1
35
1 54
4 -3 9
86
8 82
8 0 0
76
7 32
1 6 36
43
3 74
7 -4 16
40
2 40
2 0 0
60
6 53
3 3 9
d
2
= 72
Solution
Calculate the value of the test statistic, rs
where d * u - v
) , (
-
,



n n
d
r
s
Solution
) , (
-
,



n n
d
r
s
) , 8 ( 8
+ -
,



s
r
/)4
4.
,
s
r
,4 . )
s
r
Interpretation:
"here is a very
wea( positive
correlation
between <nglish
and 2athematics
ran(ing%
Exercise 1
<arly in the first semester, )+ students were
as(ed to sit on a test to determine their
mathematic ability% Ct the end of the first
semester they sat for their mathematics
eDamination% "he distribution of data is not
normal% Calculate the !pearman ran( correlation
coefficient for the two sets of mar(s and
interpret the results%
Exercise 1
Students Pre-test Eamination mar!s
) 61 ,9
9 97 -=
7 1+ ,;
6 6= ,1
1 77 -;
= 9) ;=
; )7 ;9
- 7+ -6
, 76 -1
)+ 1+ ,-
Anser
!pearman rho,
Interpretation: "here is a strong positive
correlation between the pre-test and
eDamination mar(s which means that students
who score high mar(s in the pre-test tend to
score high mar(s also in the eDamination%
*4 . )
s
r
U!ian "eertian Pekali "orelasi
Pangkat Spearman
e(ali (orelasi pang(at !pearman &r
s
' 3uga
merupa(an penganggar (epada
parameter populasi
s
%
Cpabila wu3udnya hubungan tida( linear
atau tiada hubungan linear di antara dua
pembolehubah, ma(a
s
* +%
U!ian "eertian Pekali "orelasi
Pangkat Spearman
Untu( menentu(an bahawa nilai parameter
populasi adalah tida( sifar, u3ian signifi(an r
s
dila(u(an:
)' 2engguna(an :adual !pearman
Degree of freedom, df * v * n
!ignificant level * E
"ola( @
o
apabila r
s kiraan
F r
s kritikal
U!ian "eertian Pekali "orelasi
Pangkat Spearman
)' 2engguna(an :adual "aburan-t
Degree of freedom, df * v * n - 9
!ignificant level * E
t &E,df' one-tailed
t &E/9,df' two-tailed
"ola( @
o
apabila T F t
kritikal

s
s
r
n
r T

r
s
= pekali korelasi Spearman
n 1 sai= sampel
Contoh Soalan
#Okt $%%&'
!eorang penga3ar usat Aemahiran Gatu ahat
ingin menentu(an sama ada terdapat per(aitan
antara (eputusan u3ian aptitud dan hasilan
&output' dalam unit doHen bagi satu tempoh
masa% Geliau telah memilih - orang pelatih
sebagai sampel% :adual beri(ut menun3u((an
senarai s(or u3ian aptitud dan hasil (er3a bagi
pelatih tersebut%
:adual: @asilan Aer3a dan Aeputusan U3ian Cptitud bagi
- pelatih usat Aemahiran Gatu ahat%
Aira(an (orelasi !pearman bagi data yang diberi(an,
la(u(an u3ian signifi(an dan seterusnya tafsir(an
dapatan tersebut%
Pela"ar #eputusan $"ian
%ptitud
&asilan #er"a
C = 7+
G , 6,
C 7 )-
D - 69
< ; 7,
I 1 91
4 - 6)
@ )+ 19
Penyelesaian
#Menggunakan (adual Spearman'
Iormula
n * -
. &no% of pairs' * -
) * %.%&
) , (
-
,



n n
d
r
s
Penyelesaian
#Menggunakan (adual Spearman'
5ang(ah ): Nyatakan H
o
dan H
a
@
o
: "ida( terdapat per(aitan antara (eputusan
u3ian aptitud dan hasilan (er3a%
@
o
:
s
= +
@
a
: "erdapat per(aitan antara (eputusan u3ian
aptitud dan hasilan (er3a%
@
a
:
s
> +
Penyelesaian
#Menggunakan (adual Spearman'
5ang(ah 9: Tentukan taburan yang akan
digunakan
Disebab(an sampel adalah daripada populasi
(ecil dan pembolehubah tida( bertaburan
normal, ma(a u3ian pe(ali (orelasi pang(at
!pearman a(an diguna(an%
Penyelesaian
#Menggunakan (adual Spearman'
5ang(ah 7: Kirakan pekali korelasi pangkat Spearman, r
s
x u y v d = u - v d
2
6 3 30 3 0 0
9 7 49 7 0 0
3 1 18 1 0 0
8 5.5 42 6 -0.5 0.25
7 4 39 4 0 0
5 2 25 2 0 0
8 5.5 41 5 0.5 0.25
10 8 52 8 0 0
d
2
= 0.5
Penyelesaian
#Menggunakan (adual Spearman'
Jleh (erana nilai pe(ali (orelasi r
s
adalah
positif, ma(a
@
o
:
s
= +
@
a
:
s
> +
Terdapat perhubungan positif
ang signifikan antara keputusan
u,ian aptitud dan hasilan ker,a
) , 8 ( 8
) / . ) ( -
,


kiraan s
r
**4, . )
kiraan s
r
) , (
-
,



n n
d
r
kiraan s
Penyelesaian
#Menggunakan (adual Spearman'
Daripada :adual !pearman
r
s kritikal
= +0.643
Penyelesaian
#Menggunakan (adual Spearman'
5ang(ah 6: Membuat Keputusan
Jleh (erana r
s kiraan
* +%,,6 lebih besar daripada r
s
kritikal
* +%=67 dan berada di (awasan penola(an%
8e3ection region
+%=67
@
o
ditola( dan (esimpulannya
terdapat per(aitan antara
(eputusan u3ian aptitud dan hasilan
(er3a
.on re3ection region
Penyelesaian
#Menggunakan (adual Ta+uran,t'
5ang(ah ): Nyatakan H
o
dan H
a
@
o
: "ida( terdapat per(aitan antara (eputusan
u3ian aptitud dan hasilan (er3a%
@
o
:
s
= +
@
a
: "erdapat per(aitan antara (eputusan u3ian
aptitud dan hasilan (er3a%
@
a
:
s
> +
Penyelesaian
#Menggunakan (adual Ta+uran,t'
5ang(ah 9: Menentukan kawasan penolakan
dan kawasan penerimaan
Degree of freedom, df * - B 9 * =
!ignificant level , E * +%+1
t
kritikal
* )%,67 &ru3u( 3adual taburan-t'
.on re3ection region
8e3ection region
)%,67
Penyelesaian
#Menggunakan (adual Ta+uran,t'
5ang(ah 7: Kirakan nilai ujian statistik, T

s
s
r
n
r T

**4 . ) ,
8
**4 . )

T
- . T
Penyelesaian
#Menggunakan (adual Ta+uran,t'
5ang(ah 6: Membuat Keputusan
T > t
kritikal
99%9= F )%,67
@
o
ditola( dan terdapat per(aitan antara
(eputusan u3ian aptitud dan hasilan (er3a%
.on re3ection region
8e3ection region
)%,67
Latihan 1
!yari(at insuran "a(aful telah men3alan(an
(ursus pen3ualan dan pemasaran yang
dire(abentu( untu( mening(at(an prestasi
wa(il-wa(il pen3ualan% Dalam usaha untu(
menilai program tersebut, pengurus latihan
pemasaran dan pen3ualan ingin melihat sama
ada terdapat hubungan atau tida( antara
pencapaian program dan pen3anaan pen3ualan
tahunan selepas itu% :adual beri(ut
menun3u((an data yang di(umpul(an oleh
pengurus (e atas )) orang graduan program itu%
Latihan 1
:adual: 8ang(ing restasi encapaian Aursus dan 8ang(ing :ualan
"ahunan Gagi )) orang e(er3a Di !yari(at Insuran "a(aful
Gerdasar(an 3adual, (ira(an (olerasi !pearman bagi data yang diberi(an%
Pe!er"a Ran!in' Prestasi
Pencapaian
#ursus
Ran'!in' Jualan
Tahunan
!aifudin ) 6
.oraHlina 9 =
Cshraf 7 )
.or CHura 6 9
.orlaila 1 ;
.ura(ma = )+
4auri ; 7
8ahifa - 1
.orhidayu , -
Cinnie )+ ,
.urhaini )) ))
(aapan Latihan 1
r
s kiraan
* +%=7= lebih besar daripada r
s kritikal
*
+%17= dan berada di (awasan penola(an%
@
o
ditola( dan (esimpulannya terdapat
perhubungan antara pen(aitan antara prestasi
pencapaian (ursus dan pen3anaan 3ualan
tahunan%
"he minimum values of r
s
needed for statistical
significance are shown in critical values table of
!pearman for values of N from 1 to 7+%&.ote
that when using this table, you need only refer to
N B the number of pairs of ran(s B rather than
degrees of freedom%'
When N is greater than 7+, the critical values for
testing a earson r for statistical significance will
give a very good approDimation% "hat is, you can
refer the computed !pearman correlation
coefficient to critical values table of the earson
r with N B 9 degrees of freedom%
8ememberK

Вам также может понравиться