Presentation is loading. Please wait.

Presentation is loading. Please wait.

SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression.

Similar presentations


Presentation on theme: "SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression."— Presentation transcript:

1 SIMPLE LINEAR REGRESSION

2 2 Simple Regression Linear Regression

3 3 Simple Regression Definition A regression model is a mathematical equation that describes the relationship between two or more variables. A simple regression model includes only two variables: one independent and one dependent. The dependent variable is the one being explained, and the independent variable is the one used to explain the variation in the dependent variable.

4 4 Linear Regression Definition A (simple) regression model that gives a straight-line relationship between two variables is called a linear regression model.

5 5 Figure 1 Relationship between food expenditure and income. (a) Linear relationship. (b) Nonlinear relationship. Food Expenditure Income (a) (b) Linear Nonlinear

6 6 Figure 2 Plotting a linear equation. 150 100 50 5 10 15 x y = 50 + 5 x x = 0 y = 50 x = 10 y = 100 y

7 7 SIMPLE LINEAR REGRESSION ANALYSIS Scatter Diagram Least Square Line Interpretation of a and b Assumptions of the Regression Model

8 8 SIMPLE LINEAR REGRESSION ANALYSIS cont. y = A + B x Constant term or y-interceptSlope Independent variable Dependent variable

9 9 SIMPLE LINEAR REGRESSION ANALYSIS cont. Definition In the regression model y = A + Bx + Є, A is called the y -intercept or constant term, B is the slope, and Є is the random error term. The dependent and independent variables are y and x, respectively.

10 10 SIMPLE LINEAR REGRESSION ANALYSIS Definition In the model ŷ = a + bx, a and b, which are calculated using sample data, are called the estimates of A and B.

11 11 Table 1 Incomes (in hundreds of dollars) and Food Expenditures of Seven Households IncomeFood Expenditure 35 49 21 39 15 28 25 9 15 7 11 5 8 9

12 12 Scatter Diagram Definition A plot of paired observations is called a scatter diagram.

13 13 Figure 4 Scatter diagram. Income Food expenditure First household Seventh household Inco me Food Expendi ture 35 49 21 39 15 28 25 9 15 7 11 5 8 9

14 14 Figure 5 Scatter diagram and straight lines. Income Food expenditure

15 15 Least Squares Line Figure 6 Regression line and random errors. Income Food expenditure e Regression line

16 16 OUTPUT SPSS

17 17 The Least Squares Line a=1,142 b=0,264 Thus, ŷ = 1.1414 + 0. 2642x

18 18

19 19 Figure 7 Error of prediction. e Predicted = $1038.84 Error = -$138.84 Actual = $900 ŷ = 1.1414 +.2642 x Income Food expenditure

20 20 Figure. Errors of prediction when regression model is used. Food expenditure Income ŷ = 1.1414 +.2642x

21 21 Interpretation of a and b Interpretation of a Consider the household with zero income ŷ = 1.1414 +.2642(0) = $1.1414 hundred Thus, we can state that households with no income is expected to spend $114.14 per month on food

22 22 Interpretation of a and b cont. Interpretation of b The value of b in the regression model gives the change in y due to change of one unit in x We can state that, on average, a $1 increase in income of a household will increase the food expenditure by $0.2642

23 23 Figure 8 Positive and negative linear relationships between x and y. (a) Positive linear relationship. (b) Negative linear relationship. b > 0 b < 0 y x y x

24 24 Table 4 xyŷ = 1.1414 +.2642xe = y – ŷ 35 49 21 39 15 28 25 9 15 7 11 5 8 9 10.3884 14.0872 6.6896 11.4452 5.1044 8.5390 7.7464 -1.3884.9128.3104 -.4452 -.1044 -.5390 1.2536 1.9277.8332.0963.1982.0109.2905 1.5715

25 25 Linearitas Test (Uji Validitas Model) ModelSum of Squares Degrees of Freedom (db) Mean Square Value of the test statistic (F Value ) Regression SS reg 1MS reg ResidualSS res n-2MS res TotalSSTN-1 Table. Validity for Simple Regression Model

26 26 OUTPUT SPSS

27 27 Figure Nonlinear relations between x and y. (a) (b) y x y x

28 28 F table,db reg =1 and db res =n-2

29 29 SIGNIFICANCE KOEFISIEN REGRESI

30 30

31 31 Output SPSS

32 32 Do not reject H 0 Reject H 0 t table = 2.571 Significan level α = 0.05 -t table = -2.571

33 33 REGRESSION ANALYSIS: COMPLETE EXERCISES Exercise 1: The following data give the experience (in years ) and monthly salary (in hundreds of dollars) of nine randomly selected secretaries.

34 34 Exercise 1 Experience (years) Monthly salary (Hundreds of dollars) 14 3 5 6 4 9 18 5 16 42 24 33 31 29 39 47 30 43

35 35 a. Construct a scatter diagram for these data. b. Find the regression line with experience as an independent variable and monthly salary as a dependent variable. c. Give a brief interpretation of the values of a and b calculated in part b. d. Plot the regression line on the scatter diagram of part a and show the errors by drawing vertical lines between the scatter points and the regression line. e. Does the regression model show a linear relationship between experience and monthly salary? Use 5 % significant level. f. Construct a 5 % significant level for b.

36 36 Exercise 2 A random sample of eight drivers insured with a company and having similar auto insurance policies was selected. The following table lists their driving experience (in years) and monthly auto insurance premiums.

37 37 Example 2 Driving Experience (years) Monthly Auto Insurance Premium 5 2 12 9 15 6 25 16 $64 87 50 71 44 56 42 60

38 38 Scatter diagram and the regression line. e) Insurance premium Experience

39 39 Solution.. g) The predict value of y for x = 10 is ŷ = 76.6605 – 1.5476(10) = $61.18

40 40 Solution ….. i)

41 41 Solution … j)  H 0 : B = 0  B is not negative  H 1 : B < 0  B is negative

42 42 Solution …. Area in the left tail = α =.05 df = n – 2 = 8 – 2 = 6 The critical value of t is -1.943

43 43 Figure.. α =.01 Do not reject H 0 Reject H 0 Critical value of t t -1.943 0

44 44 Solution … From H 0

45 45 Solution … The value of the test statistic t = -2.937 It falls in the rejection region Hence, we reject the null hypothesis and conclude that B is negative

46 46 Figure …. -2.447 0 2.447 t α /2 =.025 Do not reject H 0 Reject H 0 Two critical values of t


Download ppt "SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression."

Similar presentations


Ads by Google