29
Statistik: 2.11.04 Mehr zur Regression

Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

Embed Size (px)

Citation preview

Page 1: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

Statistik: 2.11.04

Mehr zur Regression

Page 2: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 2

Beispiel: Wohnungsmarkt

Fläche 122 71 125 45 100 63 194 85

Preis 530 410 480 170 315 455 885 400

Fläche 164 119 140 109 40 62 84 65

Preis 900 550 790 810 390 440 300 385

Für 16 Angebote von Eigentumswohnungen wurden registriert: Fläche der Wohnung (m2) Angebotspreis (1000 EUR)

Page 3: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 3

Lineare Regression

0

200

400

600

800

1000

0 50 100 150 200 250Fläche (m2)

Pre

is (

1000

EU

R)

Gerade, die die Datenwolke im Streudiagramm bzw.die Beziehung zwischen den dargestellten Merkmalen möglichst gut repräsentiertWohnungsmarkt:

Daten und Regressionsgerade

Page 4: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 4

Regression in EXCEL: Ausgabe: Zusammenfassung

Regressions-Statistik

Multipler Korrela-tionskoeffizient 0,826

Bestimmtheitsmaß 0,682

Adj. Bestimmt-heitsmaß 0,659

Standardfehler 128,12

Beobachtungen 16

 Koeffizienten

Standard fehler t-Statistik P-Wert

Schnittpunkt 97,59 82,39 1,18 0,256

X Variable 1 4,19 0,76 5,47 8,2E-05

Page 5: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 5

Regression Schätzen und Bewerten

Schätzen der Koeffizienten: Methode der kleinsten Quadrate

Bewerten der erhaltenen Regressionsbeziehung Anwenden der Kriterien

Bestimmtheitsmaß t-Statistik

Analyse der Residuen

Page 6: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 6

Modell: lineare Regression

Y: Abhängiges Merkmal, endogene VariableX: Unabhängiges Merkmal, exogene Variable

einfaches lineares Regressionsmodell (statisches Modell)

: Koeffizient von X: Interzeptu: Zufallsfehler, Störgröße, Störterm, „Noise“

i i iY a X u

1 2 2 3 3 ...t t t k kt tY X X X u

Page 7: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 7

Dynamische Modelle

einfaches dynamisches Modell

autoregressives (AR-)Modell

allgemeines dynamisches Modell

ADL-Modell

1t t tY X u

1t t tY Y u

1 1 2 3 1t t t t tY Y X X u

1 1 2 2 ...t t t k kt tY Y X X u

Page 8: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 8

Mehrgleichungsmodelle

Mit gemeinsamen Regressoren

Interdependentes Mehrgleichungsmodell

1 1 2 1 3 2 1t t t tY X X u

2 1 2 1 3 2 2t t t tY X X u

1 1 2 1 3 2 1t t t tY X Y u 2 1 2 1 3 2 4 1 2t t t t tY X X Y u

Page 9: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 9

Lineare & nichtlineare Modelle

(in den Parametern) lineare Modelle

Nichtlineares, aber linearisierbares Modell

Lineare Approximation ist oft lokal gut brauchbar

1 2t tY X 2

1 2 3t t tY X X

ln ln ln lnb ct t t t t tQ aL K Q a b L c K

Page 10: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 10

Prinzip der Kleinsten Quadrate

i i iY X u

2 2

1 1

( , ) [ ( )]n n

i i ii i

S u Y X

Modell:

Summe der Fehlerquadrate

Prinzip der Kleinsten Quadrate: Minimiere

unter Variation von ,

Beobachtungen: ( , ) , 1,...,i iX Y i n

( , )S

Page 11: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 11

Normalgleichungen

partielles Ableiten von und Nullsetzen der Ableitungen gibt die Normalgleichungen

( , )S

i ii ian b X Y

2i i i ii i i

a X b X X Y Beachte! Die Normalgleichungen sind linear in a und b!

Page 12: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 12

Kleinste-Quadrate Schätzer

2,xy

x

sb a Y bX

s

2 2

1

1( )

n

x ii

s X Xn

mit

1

1( )( )

n

xy i ii

s X X Y Yn

auch OLS-Schätzer (ordinary least squares)

Page 13: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 13

Interpretation von b

i i iY X u

i iY a bX

Modell:

OLS-Anpassung ergibt

b: mittlere Änderung von Y, wenn X = 1

Page 14: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 14

Eigenschaften von Schätzern

Wünschenswerte Eigenschaften: Erwartungstreue: minimale Varianz Konsistenz asymptotisch minimale Varianz

{ }E b

Page 15: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 15

OLS-Schätzer: Eigenschaften

i i iY X u

1. Sie sind erwartungstreu

Modell:

Für die OLS-Schätzer a und b gilt:

2. Ihre Varianzen2 2

22 2

1( ) , ( )

x x

XV b V a

ns n s

sind minimal in der Klasse der linearen erwartungs- treuen Schätzer [Gauss-Markov] 2 = V (u)

Page 16: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 16

Residuen

Schätzung der Störgrößenvarianz 2

Streuungszerlegung

( )i i ie Y a bX

2 21

2e iis e

n

Page 17: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 17

Streuungszerlegung

2

2 2

( )

ˆ( )

i

i i

TSS Y Y

Y Y e ESS RSS

TSS: Gesamtvariation (total sum of squares)ESS: (durch die Regression) erklärte Variation (explained sum of squares)RSS: residuale oder nicht erklärte Variation (residual sum of squares)

Page 18: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 18

Bestimmtheitsmaß

Anteil der durch das Modell erklärten Varianz an der Gesamtvarianz der YEs gilt 0 ≤ R2 ≤ 1

R2 = 0 bedeutet: Modell erklärt nichts,R2 ist das Quadrat der Korrelation zwischen und Y

22

21 1 e

y

sESS RSSR

TSS TSS s

tY YY

Page 19: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 19

Adjustiertes Bestimmtheitsmaß

k: Anzahl der Regressoren (k =2 bei einfacher Regression)R2 wird mit der Anzahl der Regressoren tendenziell größerZum Vergleich von Modellen mit unterschiedlicher Anzahl von Regressoren ist vorzuziehen

22

2

11 e

y

snR

n k s

2R

Page 20: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 20

Bewertung von Modellen

Kriterien zum Bewerten von Regressions- beziehungen:

t-Test F-TestDurbin-Watson Test

Page 21: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 21

t-TestBei Annahme von normalverteilten Störgrößengilt für den OLS-Schätzer b (k: Anzahl der Regressoren):

( )i i

b

bT t n k

s

T folgt der t-Verteilung mit n-k FreiheitsgradenZum Test der Nullhypothese Ho: = 0:

Berechnung des p-Wertes zu bDie Nullhypothese Ho: = 0 bedeutet: Die Regressorvariable hat keinen Erklärungsbeitrag für Y

Ähnlich der F –Test bei mehreren Regressoren

Page 22: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 22

Spezifikationstests

auch Adäquatheitstests genannt; ein Beispiel ist derDurbin-Watson Test auf serielle Korrelation der Störgrößen

21

2

2

1

( )n

i ii

n

ii

e eDW

e

Page 23: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 23

Wohnungsmarkt

0

200

400

600

800

1000

0 50 100 150 200 250Fläche (m2)

Pre

is (

1000

EU

R)

Regression Preis = + Fläche + u

Daten und Regressionsgerade

Page 24: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 24

Regression in EXCEL: Ausgabe: Zusammenfassung

Regressions-Statistik

Multipler Korrela-tionskoeffizient 0,826

Bestimmtheitsmaß 0,682

Adj. Bestimmt-heitsmaß 0,659

Standardfehler 128,12

Beobachtungen 16

 Koeffizienten

Standard fehler t-Statistik P-Wert

Schnittpunkt 97,59 82,39 1,18 0,256

X Variable 1 4,19 0,76 5,47 8,2E-05

Preis = 97.59 + 4.19 Fläche

Page 25: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 25

Wohnungsmarkt, Forts.

0

200

400

600

800

1000

0 50 100 150 200 250Fläche (m2)

Pre

is (

1000

EU

R)

Geschätzte Regressionsgerade

Preis = 97.59 + 4.19 Fläche

Page 26: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 26

Wohnungsmarkt, Forts.

Geschätzte Regressionsgerade

• Je m2 muss man im Durchschnitt mit Kosten von 4.19 Euro rechnen;• dazu kommt ein fixer Betrag von im Durchschnitt 97.59 Euro

Preis = 97.59 + 4.19 Fläche

Page 27: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 27

Wohnungsmarkt, Forts.

Fläche Kurvenanpassung

0

200

400

600

800

1000

0 50 100 150 200 250

Fläche

Pre

is Preis

Schätzung für Preis

Page 28: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 28

Wohnungsmarkt

• Residuen:

• zur Beurteilung der Qualität der Erklärung der Daten durch die Regressionsgerade, insb. des Effekts von einzelnen Beobachtungen

( )i iY a bX

Page 29: Statistik: 2.11.04 Mehr zur Regression. 2.11.04PI Statistik, WS 2004/05 (6)2 Beispiel: Wohnungsmarkt Fläche 122 71125451006319485 Preis 530 410480170315455885400

2.11.04 PI Statistik, WS 2004/05 (6) 29

Wohnungsmarkt: ResiduenFläche Residuenplot

-300

-200

-100

0

100

200

300

0 50 100 150 200 250

Fläche

Res

idu

en