SIMPLE LINEAR REGRESSION
2 Simple Regression Linear Regression
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 Linear Regression Definition A (simple) regression model that gives a straight-line relationship between two variables is called a linear regression model.
5 Figure 1 Relationship between food expenditure and income. (a) Linear relationship. (b) Nonlinear relationship. Food Expenditure Income (a) (b) Linear Nonlinear
6 Figure 2 Plotting a linear equation x y = x x = 0 y = 50 x = 10 y = 100 y
7 SIMPLE LINEAR REGRESSION ANALYSIS Scatter Diagram Least Square Line Interpretation of a and b Assumptions of the Regression Model
8 SIMPLE LINEAR REGRESSION ANALYSIS cont. y = A + B x Constant term or y-interceptSlope Independent variable Dependent variable
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 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 Table 1 Incomes (in hundreds of dollars) and Food Expenditures of Seven Households IncomeFood Expenditure
12 Scatter Diagram Definition A plot of paired observations is called a scatter diagram.
13 Figure 4 Scatter diagram. Income Food expenditure First household Seventh household Inco me Food Expendi ture
14 Figure 5 Scatter diagram and straight lines. Income Food expenditure
15 Least Squares Line Figure 6 Regression line and random errors. Income Food expenditure e Regression line
16 OUTPUT SPSS
17 The Least Squares Line a=1,142 b=0,264 Thus, ŷ = x
18
19 Figure 7 Error of prediction. e Predicted = $ Error = -$ Actual = $900 ŷ = x Income Food expenditure
20 Figure. Errors of prediction when regression model is used. Food expenditure Income ŷ = x
21 Interpretation of a and b Interpretation of a Consider the household with zero income ŷ = (0) = $ hundred Thus, we can state that households with no income is expected to spend $ per month on food
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 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 Table 4 xyŷ = xe = y – ŷ
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 OUTPUT SPSS
27 Figure Nonlinear relations between x and y. (a) (b) y x y x
28 F table,db reg =1 and db res =n-2
29 SIGNIFICANCE KOEFISIEN REGRESI
30
31 Output SPSS
32 Do not reject H 0 Reject H 0 t table = Significan level α = t table =
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 Exercise 1 Experience (years) Monthly salary (Hundreds of dollars)
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 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 Example 2 Driving Experience (years) Monthly Auto Insurance Premium $
38 Scatter diagram and the regression line. e) Insurance premium Experience
39 Solution.. g) The predict value of y for x = 10 is ŷ = – (10) = $61.18
40 Solution ….. i)
41 Solution … j) H 0 : B = 0 B is not negative H 1 : B < 0 B is negative
42 Solution …. Area in the left tail = α =.05 df = n – 2 = 8 – 2 = 6 The critical value of t is
43 Figure.. α =.01 Do not reject H 0 Reject H 0 Critical value of t t
44 Solution … From H 0
45 Solution … The value of the test statistic t = It falls in the rejection region Hence, we reject the null hypothesis and conclude that B is negative
46 Figure … t α /2 =.025 Do not reject H 0 Reject H 0 Two critical values of t