Regresi linier sederhana

40
REGRESI LINIER SEDERHANA KULIAH #2 ANALISIS REGRESI Usman Bustaman

description

Regresi linier sederhana. Kuliah #2 analisis regresi Usman Bustaman. Apa itu ?. Regresi Linier Sederhana. 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 - PowerPoint PPT Presentation

Transcript of Regresi linier sederhana

REGRESI LINIER SEDERHANAKULIAH #2 ANALISIS REGRESIUsman Bustaman

APA ITU?• Regresi• Linier• Sederhana

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).

LINIER Masih ingat Y=mX+B? Slope? Konstanta?

B

m

X

Y

LINIER LEBIH LANJUT…- Linier dalam paramater…- Persamaan Linier orde 1:- Persamaan Linier orde 2:- Dst… (orde pangkat tertinggi yang terdapat pada

variabel bebasnya)

SEDERHANARelasi antar 2 variabel:1 variabel bebas (independent variable)1 variabel tak bebas (dependent variable)

Y=mX+B?Mana variabel bebas?Mana variabel tak bebas?

B

m

X

Y

BAGAIMANA MEMBANGUN MODEL REGRESI LINIER SEDERHANA?

Analisis/Comment Grafik-2 Berikut:

Analisis/Comment Grafik-2 Berikut:

A B

C D

FUNGSI RATA-2 (Mean Function)

If you know something about X, this knowledge helps you predict something about Y.

PREDIKSI TERBAIK… Bagaimana mengestimasi parameter dengan cara terbaik…

Regresi Linier

Regresi Linier

Koefisien regresi

Populasi

Sampel

Y = b0 + b1Xi

Y =𝛽0+𝛽1 𝑋

Regresi Linier Model

ie

X

Y

Y Xb b0 1+=Yi

Xi

? (the actual value of Yi)

REGRESI TERBAIK = MINIMISASI ERROR- Semua residual harus nol- Minimum Jumlah residual

- Minimum jumlah absolut residual

- Minimum versi Tshebysheff

- Minimum jumlah kuadrat residual OLS

ORDINARY LEAST SQUARE (OLS)

ASSUMPTIONSLinear 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

ASUMSI LEBIH LANJUT…

Alexander Von Eye & Christof Schuster (1998) Regression Analysis

for Social Sciences

ASUMSI LEBIH LANJUT…

Alexander Von Eye & Christof Schuster (1998) Regression Analysis

for Social Sciences

PROSES ESTIMASI PARAMETER (Drapper & Smith)

KOEFISIEN REGRESIXbYb 10 =

21x

xy

xx

xy

SS

b

==

nX

X =nY

Y = observasi jumlah =n

1

)( 1

2

==

n

YYYVar

n

i

1)( 1

2

==

n

XXXVar

n

i

xxS)(SSTS yy

xyS

1),(Covar 1

==

n

YYXXYX

n

i

SIMBOL-2 (Weisberg p. 22)

MAKNA KOEFISIEN REGRESI

b0 ≈ …..

b1 ≈ …..

?x = 0

- Tinggi vs berat badan- Nilai math vs stat

- Lama sekolah vs pendptn- Lama training vs jml produksi

…….

C A

B

A

yi

 

x

yyi

 

C

B

b += ii xy

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)   

SSEVariance around the regression line  Additional variability not explained by x—what least squares method aims to minimize

== =

+=n

iii

n

i

n

iii yyyyyy

1

2

1 1

22 )ˆ()ˆ()(

REGRESSION PICTURE

Y

Variance to beexplained by predictors

(SST)

SST (SUM SQUARE TOTAL)

Y

X

Variance NOT explained by X

(SSE)

Variance explained by X

(SSR)

SSE & SSR

Y

X

Variance NOT explained by X

(SSE)

Variance explained by X

(SSR)

SST = SSR + SSE Variance to beexplained by predictors

(SST)

Koefisien Determinasi

orsby Predict explained be toVarianceXby explained Variance2 ==

SSTSSRR

Coefficient of Determinationto judge the adequacy of the regression model

Maknanya: …. ?

Koefisien Determinasi

SALAH PAHAM TTG R2

1. R2 tinggi prediksi semakin baik …. 2. R2 tinggi model regresi cocok dgn datanya …3. R2 rendah (mendekati nol) tidak ada hubungan antara

variabel X dan Y …

Korelasi

yx

xy

yyxx

xyxy

xy

SSS

r

rRR

==

== 2

Correlationmeasures the strength of the linear association between two

variables.

Pearson Correlation…?

Buktikan…!

KORELASI & REGRESI

21x

xy

xx

xy

SS

b

==yx

xy

yyxx

xyxy SS

Sr

==

𝑺𝒀=√𝑺𝒀𝒀

𝑺𝑿=√𝑺𝑿𝑿

ASSUMPTIONSLinear 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

UJI PARAMETER RLSLinear 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

DISTRIBUSI SAMPLING B1

b1 ~ Normal ~ Normal

Uji koefisien regresi

ib

iikn S

bt b= )1(

0:0:

1

0

=

i

i

HH

bb

Uji koefisien regresi

xx

eekn

SS

bbS

bt2

11

1

11)1( )(

bb =

=

0:0:

1

10

=

bb

AHH

Selang Kepercayaan koefisien regresi

xx

ekn

xx

ekn S

StbSStb

2

)1(,2/11

2

)1(,2/1 + b

Confidence Interval for b1

Uji koefisien regresi

+

=

=

xxe

ekn

SX

nS

bbS

bt2

2

00

0

00)1(

1)(bb

0:0:

0

00

=

bb

AHH

++

+

xxekn

xxekn S

Xn

StbSX

nStb

22

)1(,2/00

22

)1(,2/011

b

Confidence Interval for the intercept

Selang Kepercayaan koefisien regresi