You are on page 1of 10

Korelasi

Merupakan contoh analisis bivariat (2 pemboleh


ubah)
Istilah penting

Pembolehubah bebas, x (independent variable)


Pembolehubah bergantung, y (dependent
variable)
Figure 15-1 (p. 412)
The same set of n = 6 pairs of scores (X and Y values) is shown in a table and in a scatterplot. Notice that the scatterplot allows
you to see the relationship between X and Y.
Figure 15-5 (p. 422)
Hypothetical data showing the logical relationship between the number
of churches and the number of serious crimes for a sample of U.S. cities.
Korelasi
• Satu teknik statistik untuk mengukur kekuatan
hubungan antara dua pembolehubah.
• Daripada nilai pekali korelasi kita tahu apakah
arah hubungan dan kekuatan hubungan.
Pekali korelasi Pearson

n( xy )  ( x)(  y )
r
[n( x )  ( x) ][ n( y )  ( y ) ]
2 2 2 2

 Untuk data interval/ratio

-1
r=0 menunjukkan tiada korelasi.
r=1 atau r=-1 menunjukkan korelasi sempurna atau perfect correlation.
Contoh 1: Cari pekali korelasi r bagi data berikut

x y
1 3
2 6
4 4
5 7
Pekali korelasi Pearson

n( xy )  ( x)(  y )
r
[n( x )  ( x) ][ n( y )  ( y ) ]
2 2 2 2

 Untuk data interval/ratio

-1
r=0 menunjukkan tiada korelasi.
r=1 atau r=-1 menunjukkan korelasi sempurna atau perfect correlation.
x y x2 y2 xy
1 3 1 9 3
2 6 4 36 12
4 4 16 16 16
5 7 25 49 35
12 20 46 110 66
n( xy )  ( x)(  y )
r
[n( x )  ( x) ][ n( y )  ( y ) ]
2 2 2 2

4(66)  12(20) 24
 
[4(46)  12 ][ 4(110 )  20 ]
2 2
(40)( 40)
24
  0.6
40
Maksud
r=0.6
Nilai positif menunjukkan kedua-dua
pembolehubah berubah dalam arah yang
sama iaitu bila nilai x meningkat nilai y juga
meningkat
Nilai r yang lebih hampir dengan 1 menunjukkan
hubungan yang lebih kuat.

You might also like