Regresi linier sederhana Kuliah #2 analisis regresi Usman Bustaman @akbardarmawan/3SE1
Apa itu? Regresi Linier Sederhana @akbardarmawan/3SE1
Regresi (Buku 5: Kutner, Et All P. 5) Sir Francis Galton (latter part of the 19th century): studied the relation between heights of parents and children noted that the heights of children of both tall and short parents appeared to "revert" or "regress" to the mean of the group. developed a mathematical description of this regression tendency, today's regression models (to describe statistical relations between variables). @akbardarmawan/3SE1
linier Masih ingat Y=mX+B? Slope? Konstanta? m B Y X @akbardarmawan/3SE1
Linier lebih lanjut… Linier dalam paramater… Persamaan Linier orde 1: Dst… (orde pangkat tertinggi yang terdapat pada variabel bebasnya) @akbardarmawan/3SE1
sederhana Relasi antar 2 variabel: 1 variabel bebas (independent variable) 1 variabel tak bebas (dependent variable) Y=mX+B? Mana variabel bebas? Mana variabel tak bebas? Y m X B @akbardarmawan/3SE1
Bagaimana membangun Model Regresi Linier Sederhana Bagaimana membangun Model Regresi Linier Sederhana? Analisis/ Comment Grafik-2 Berikut: @akbardarmawan/3SE1
Analisis/Comment Grafik-2 Berikut: D @akbardarmawan/3SE1
Fungsi rata-2 (Mean Function) If you know something about X, this knowledge helps you predict something about Y. @akbardarmawan/3SE1
Prediksi terbaik… Bagaimana mengestimasi parameter dengan cara terbaik… @akbardarmawan/3SE1
Regresi Linier @akbardarmawan/3SE1
Regresi Linier ˆ Y= 𝛽 0 + 𝛽 1 𝑋 Y = b0 + b1Xi Populasi Koefisien regresi Sampel ˆ Y = b0 + b1Xi @akbardarmawan/3SE1
Regresi Linier Model Y X b b + = e Y X Yi Xi ? (the actual value of Yi) Y X b b 0 1 + = Yi i e Xi X @akbardarmawan/3SE1
Regresi terbaik = minimisasi error Semua residual harus nol Minimum Jumlah residual Minimum jumlah absolut residual Minimum versi Tshebysheff Minimum jumlah kuadrat residual OLS @akbardarmawan/3SE1
Ordinary Least Square (OLS) @akbardarmawan/3SE1
Assumptions Linear regression assumes that… 1. The relationship between X and Y is linear 2. Y is distributed normally at each value of X 3. The variance of Y at every value of X is the same (homogeneity of variances) 4. The observations are independent @akbardarmawan/3SE1
Asumsi lebih lanjut… Alexander Von Eye & Christof Schuster (1998) Regression Analysis for Social Sciences @akbardarmawan/3SE1
Asumsi lebih lanjut… Alexander Von Eye & Christof Schuster (1998) Regression Analysis for Social Sciences @akbardarmawan/3SE1
Proses estimasi parameter (Drapper & Smith) @akbardarmawan/3SE1
Koefisien regresi @akbardarmawan/3SE1
Simbol-2 (Weisberg p. 22) @akbardarmawan/3SE1
Makna koefisien regresi x = 0 ? b0 ≈ ….. b1 ≈ ….. - Tinggi vs berat badan - Nilai math vs stat - Lama sekolah vs pendptn - Lama training vs jml produksi ……. @akbardarmawan/3SE1
Regression Picture C B SSE SSR Variability due to x (regression) yi x y A2 B2 C2 SST Total squared distance of observations from naïve mean of y Total variation SSR Distance from regression line to naïve mean of y Variability due to x (regression) SSE Variance around the regression line Additional variability not explained by x—what least squares method aims to minimize @akbardarmawan/3SE1
explained by predictors SST (Sum Square TOTAL) Variance to be explained by predictors (SST) Y @akbardarmawan/3SE1
SSE & SSR (SSR) (SSE) X Y Variance explained by X Variance NOT @akbardarmawan/3SE1
explained by predictors SST = SSR + SSE Variance to be explained by predictors (SST) X Variance explained by X (SSR) Y Variance NOT explained by X (SSE) @akbardarmawan/3SE1
Coefficient of Determination Koefisien Determinasi Coefficient of Determination to judge the adequacy of the regression model Maknanya: …. ? @akbardarmawan/3SE1
Koefisien Determinasi @akbardarmawan/3SE1
Salah paham ttg r2 R2 tinggi prediksi semakin baik …. R2 tinggi model regresi cocok dgn datanya … R2 rendah (mendekati nol) tidak ada hubungan antara variabel X dan Y … @akbardarmawan/3SE1
measures the strength of the linear association between two variables. Korelasi Buktikan…! Pearson Correlation…? Correlation measures the strength of the linear association between two variables. @akbardarmawan/3SE1
Korelasi & Regresi 𝑺 𝒀 = 𝑺 𝒀𝒀 𝑺 𝑿 = 𝑺 𝑿𝑿 @akbardarmawan/3SE1
Assumptions Linear regression assumes that… 1. The relationship between X and Y is linear 2. Y is distributed normally at each value of X 3. The variance of Y at every value of X is the same (homogeneity of variances) 4. The observations are independent @akbardarmawan/3SE1
Uji parameter RLS Linear regression assumes that… 1. The relationship between X and Y is linear 2. Y is distributed normally at each value of X 3. The variance of Y at every value of X is the same (homogeneity of variances) 4. The observations are independent @akbardarmawan/3SE1
Distribusi sampling b1 @akbardarmawan/3SE1
b1 ~ Normal ~ Normal @akbardarmawan/3SE1
Uji koefisien regresi @akbardarmawan/3SE1
Uji koefisien regresi @akbardarmawan/3SE1
Confidence Interval for b1 Selang Kepercayaan koefisien regresi Confidence Interval for b1 @akbardarmawan/3SE1
Uji koefisien regresi @akbardarmawan/3SE1
Confidence Interval for the intercept Selang Kepercayaan koefisien regresi Confidence Interval for the intercept @akbardarmawan/3SE1