korelasi dan regresi -...
TRANSCRIPT
![Page 1: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/1.jpg)
KORELASI & REGRESI LINIER
Saptawati Bardosono
![Page 2: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/2.jpg)
Contoh kasus
Bagaimana hubungan antara volume plasma (variabel efek yang berskala numerik) dengan berat badan (variabel paparan yang juga berskala numerik)?
![Page 3: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/3.jpg)
Tabel BB dan volume plasma laki-laki sehat (n=8)
Subyek BB (kg) Volume plasma (l)1 58,0 2,752 70,0 2,863 74,0 3,374 63,5 2,765 62,0 2,626 70,5 3,497 71,0 3,058 66,0 3,12
![Page 4: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/4.jpg)
Tabel BB dan volume plasma laki-laki sehat (n=8)
Tests of Normality
.218 8 .200* .952 8 .727
.176 8 .200* .935 8 .565Berat Badan (kg)Volume plasma (liter)
Statistic df Sig. Statistic df Sig.Kolmogorov-Smirnova Shapiro-Wilk
This is a lower bound of the true significance.*.
Lilliefors Significance Correctiona.
![Page 5: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/5.jpg)
Descriptives
66.8750 1.9150562.3466
71.4034
66.972268.000029.339
5.4165858.0074.0016.00
8.5000-.412 .752-.903 1.481
3.0025 .110032.7423
3.2627
2.99672.9550
.097.31121
2.623.49.87
.5550.493 .752
-1.089 1.481
MeanLower BoundUpper Bound
95% ConfidenceInterval for Mean
5% Trimmed MeanMedianVarianceStd. DeviationMinimumMaximumRangeInterquartile RangeSkewnessKurtosisMean
Lower BoundUpper Bound
95% ConfidenceInterval for Mean
5% Trimmed MeanMedianVarianceStd. DeviationMinimumMaximumRangeInterquartile RangeSkewnessKurtosis
Berat Badan (kg)
Volume plasma (liter)
Statistic Std. Error
![Page 6: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/6.jpg)
Gambar diagram pencar volume plasma dan BB
Linear Regression
60.00 64.00 68.00 72.00
Berat Badan (kg)
2.60
2.80
3.00
3.20
3.40
Volu
me
plas
ma
(lite
r)
Volum e plasm a (liter) = 0.09 + 0.04 * bbR-Square = 0.58
![Page 7: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/7.jpg)
Persamaan garis regresi:
y = β0 + β1 x β0 & β1 = parameter atau koefisien
regresi dari regresi linier β0 = intercept, nilai dari y apabila x = 0 β1 = slope dari garis, penambahan nilai
y untuk setiap unit peningkatan x
![Page 8: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/8.jpg)
Persamaan garis regresi:
∀ β1 = Σ{(x – x)(y – y)} / Σ (x – x)2
∀ β0 = y - β1 x• Koefisien regresi = koefisien beta• Bila β1 = 0, maka tidak ada hubungan
antara x dan y
![Page 9: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/9.jpg)
Tabel BB dan volume plasma laki-laki sehat (n=8)
Subyek x y (x – x) (y – y) (x – x)2 (y– y)2
1 58,0 2,75
2 70,0 2,86
3 74,0 3,37
4 63,5 2,76
5 62,0 2,62
6 70,5 3,49
7 71,0 3,05
8 66,0 3,12
Mean 66,8 3,00
![Page 10: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/10.jpg)
Persamaan garis regresi:
∀ β1 = Σ{(x – x)(y – y)} / Σ (x – x)2
∀ β0 = y - β1 x• Dari contoh kasus:
∀Σ{(x – x)(y – y)} = 8,96∀Σ (x – x)2 = 205,38∀β1 = 8,96 / 205,38 = 0,043615∀β0 = 3,0025 – 0,043615 * 66,875 =
0,0857• Persamaan regresi:Volume plasma = 0,0857 + 0,043615
BB
![Page 11: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/11.jpg)
Cara menggambarkan garis regresi
Hitung koordinat dari 2 titik yang dilalui garis tsb, misal:
x = 60, y = 0,0857 + 0,0436*60 = 2,7 x = 70, y = 0,0857 + 0,0436*70 = 3,1 Dan garis harus melalui titik rerata
kedua variabel yaitu 66,9 dan 3,0
![Page 12: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/12.jpg)
Generalisasi ke populasi
Variasi sampling ditentukan dengan standard error (se) dari β0 dan β1
se β0 = s√[1/n + x / Σ(x-x)2] se β1 = s / √ Σ(x-x)2
s = √[{Σ(y-y)2 - β12Σ(x-x)2} / (n-2)]
s = standard deviasi
![Page 13: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/13.jpg)
Generalisasi ke populasi
s = √[{Σ(y-y)2 - β12Σ(x-x)2} / (n-2)]
= √(0,6780 – 0,04362*205,38)/6 = 0,2189 se β0 = s√[1/n + x / Σ(x-x)2] = 0,2189 √[1/8 + 66,92/205,38] = 1,0237 se β1 = s / √ Σ(x-x)2
= 0,2189 / √205,38 = 0,0153
![Page 14: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/14.jpg)
Prediksi volume plasma dari BB Volume plasma = 0,0857 + 0,043615 BB
Bila diketahui BB = 66 kg (x’), maka dapat diprediksi volume plasmanya =0,0857 + 0,0436*66 = 2,96 liter
Dengan standard error (se) nya =s√[1 + 1/n + (x’-x)2 /Σ(x-x)2] =0,2189√[1 + 1/8 + (66-66,9)2 /205,38] = 0,23 liter
![Page 15: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/15.jpg)
Korelasi Pearson:
Selain menentukan estimasi terbaik dari garis lurus, maka perlu ditentukan kekuatan hubungan antara variabel efek dan variabel paparan, atau disebut sebagai koefisien korelasi (r) =Σ(x-x)(y-y) / √[Σ(x-x)2Σ(y-y)2] yang nilainya antara -1 dan +1
![Page 16: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/16.jpg)
Contoh:
Koefisien korelasi (r) =Σ(x-x)(y-y) / √[Σ(x-x)2Σ(y-y)2] =8,96 / √(205,38*0,6780) = 0,7591
![Page 17: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/17.jpg)
Korelasi Spearman
Buat urutan (rank) masing2 variabel Hitung korelasi Pearson antar rank
![Page 18: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/18.jpg)
Korelasi rank Spearman Untuk mengetahui ada/tidak adanya
hubungan antara 2 variabel dilakukan uji korelasi
Contoh:xA = 44,1 sA = 17,999 nA = 7xB = 23,643 sB = 10,468 nB = 7c.o.v A = 39,9% c.o.v = 44,27%Distribusi tidak normalTidak boleh memakai korelasi Pearson
(parametrik)Pakai korelasi rank Spearman
![Page 19: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/19.jpg)
Korelasi rank SpearmanVar A Rank Var B Rank d d2
27,3 2 12,1 2 0 0
72,9 7 40,2 7 0 0
36,1 3 20,2 3 0 0
20,7 1 10,2 1 0 0
52,9 6 27,6 5 1 1
48,5 4 29,9 6 -2 4
50,3 5 25,3 4 1 1
Total 6
![Page 20: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/20.jpg)
Korelasi rank Spearman Kalau ada nilai variabel yang sama, maka
rank = (rank atas + rank bawah) / 2 Nilai r = 1 - 6Σd2 / [n*(n2-1)]
= 1 - (36) / [7*(72-1)]= 1 – 36/336 = 0,893
1. Korelasi positif, artinya bila variabel A meningkat akan diikuti peningkatan variabel B
2. Korelasinya bersifat kuat sekali, karena nilai r > 0,8
![Page 21: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/21.jpg)
??Subyek x Rank y Rank d d2
1 58,0 1 2,75 2
2 70,0 5 2,86 4
3 74,0 8 3,37 7
4 63,5 3 2,76 3
5 62,0 2 2,62 1
6 70,5 6 3,49 8
7 71,0 7 3,05 5
8 66,0 4 3,12 6
Mean
![Page 22: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/22.jpg)
Soal Latihan: korelasi usia dengan fungsi paru dan tinggi badan dengan fungsi paru?
Subyek Usia (tahun)
Tinggi badan (cm)
Fungsi paru (FEV1)
1 22 170 4,52
2 22 178 5,21
3 26 163 3,10
4 31 188 4,25
5 27 170 3,19
6 30 173 4,24
7 28 185 4,41
8 27 185 4,30
9 22 183 4,76
10 24 190 4,38
11 23 178 4,49
12 18 180 4,66
13 26 185 5,08
![Page 23: KORELASI DAN REGRESI - staff.ui.ac.idstaff.ui.ac.id/system/files/users/saptawati.bardosono/material/...Contoh kasus Bagaimana ... Gambar diagram pencar volume plasma dan BB Linear](https://reader030.vdocuments.net/reader030/viewer/2022021723/5ca0091e88c993c0178c8905/html5/thumbnails/23.jpg)
Soal Latihan: Korelasi skor intensitas gangguan kejiwaan dan kadar amfetamin plasma pada 10 pengguna amfetamin secara menahun?
Pasien Skor Amfetamin
1. 10 150
2. 30 300
3. 20 250
4. 15 150
5. 45 450
6. 35 400
7. 50 425
8. 15 200
9. 40 350
10. 55 475