regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/ps-12.pdf · wykład...

25
Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji, regresja krokowa

Upload: vothu

Post on 28-Feb-2019

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Wykład 12

Wydział Matematyki

Regresja liniowa wielorakaWspółczynnik determinacji, regresja krokowa

Page 2: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

The Coefficient of Multiple Determination

The coefficient of multiple determination (R2, with 0 ≤ R2 ≤ 1) is the proportionof the variation in y that is explained by the multiple regression equation.

Page 3: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1

The president of a large chain of fast-food restaurants has randomly selected10 franchises and recorded for each franchise the following information on lastyear’s net profit and sales activity.

For the 10 franchises, 77.19% of the variation in net profit is explained by the multiple regressionequation.

Page 4: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Testing the Significance of the Regression Equation

The multiple regression equation:

is based on sample data and is an estimate of the (unknown) population multiple regression equation:

If there really is no relationship between y and any of the x variables, all of the partial regression coefficients

in the population regression equation will be zero, and this is the basis on which we test the overall significance of our regression equation.

Page 5: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Testing the Significance of the Regression Equation

Page 6: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1 Testing the Significance of the Regression Equation

The president of a large chain of fast-food restaurants has randomly selected10 franchises and recorded for each franchise the following information on lastyear’s net profit and sales activity.

Page 7: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1 Testing the Significance of the Regression Equation

Using the F distribution tables to identify the critical value for F, the numberof degrees of freedom for the numerator will be k = 2; df for the denominator willbe (n - k - 1), or (10 - 2 - 1) = 7. Conducting the test at the 0.01 level of significance,the critical value is F = 9.55. The calculated test statistic (F = 11.85)exceeds the critical value, and H0 is rejected. At the 0.01 level, the multiple regressionequation is significant.

p value

Page 8: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1 Testing the Significance of the Regression Equation

Solution in Statistica

Page 9: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1

1

2

3

Page 10: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1

1

2

3

4

5

Page 11: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 1

value for Fp value

coefficient of multiple determination

Page 12: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 - stepwise multiple linear regression

http://college.cengage.com/mathematics/brase/understandable_statistics/7e/students/datasets/mlr/frames/frame.html

Page 13: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 stepwise multiple linear regression

The data (Y, X1, X2, X3, X4) are by city.Y = death rate per 1000 residentsX1 = doctor availability per 100,000 residentsX2 = hospital availability per 100,000 residentsX3 = annual per capita income in thousands of dollarsX4 = population density people per square mileReference: Life In America's Small Cities, by G.S. Thomas

Page 14: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 stepwise multiple linear regression

1

2

3

45

Page 15: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 stepwise multiple linear regression

1

2

3

4 5

Page 16: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 stepwise multiple linear regression

1

Page 17: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 2 stepwise multiple linear regression

Page 18: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

Job_prof.sta

1

2

3

Page 19: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

The first four variables (Test1-Test4) represent four different aptitude tests that were administered to each of the 25 applicants for entry-level clerical positions in a company. Regardless of their test scores, all 25 applicants were hired. Once their probationary period had expired, each of these employees was evaluated and given a job proficiency rating (variable Job_prof). Using stepwise regression, the variables (or subset of variables) that best predict job proficiency will be analyzed. Thus, the dependent variable will be Job_prof and variables Test1-Test4 will be the independent or predictor variables.

Page 20: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

1

2

3

Page 21: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

1

2

34 5 6

Page 22: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

1

Page 23: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

1

2

Page 24: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 stepwise multiple linear regression

1

2

Page 25: Regresja liniowa wieloraka - prac.im.pwr.edu.plprac.im.pwr.edu.pl/~legut/listy/PS-12.pdf · Wykład 12 Wydział Matematyki Regresja liniowa wieloraka Współczynnik determinacji,

Example 3 final solution

1