470 likes | 544 Views
SIMPLE LINEAR REGRESSION. SIMPLE LINEAR REGRESSION. Simple Regression Linear Regression. Simple Regression. Definition
E N D
SIMPLE LINEAR REGRESSION • Simple Regression • Linear Regression
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.
Linear Regression • Definition • A (simple) regression model that gives a straight-line relationship between two variables is called a linear regression model.
Figure 1 Relationship between food expenditure and income. (a) Linear relationship. (b) Nonlinear relationship. Linear Food Expenditure Food Expenditure Nonlinear Income Income (b) (a)
Figure 2 Plotting a linear equation. y y = 50 + 5x 150 100 x = 10 y = 100 50 x = 0 y = 50 5 10 15 x
SIMPLE LINEAR REGRESSION ANALYSIS • Scatter Diagram • Least Square Line • Interpretation of a and b • Assumptions of the Regression Model
SIMPLE LINEAR REGRESSION ANALYSIS cont. y = A + Bx Constant term or y-intercept Slope Independent variable Dependent variable
SIMPLE LINEAR REGRESSION ANALYSIS cont. • Definition • In the regression modely = 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.
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.
Table 1 Incomes (in hundreds of dollars) and Food Expenditures of Seven Households
Scatter Diagram • Definition • A plot of paired observations is called a scatter diagram.
Figure 4 Scatter diagram. First household Seventh household Food expenditure Income
Figure 5 Scatter diagram and straight lines. Food expenditure Income
Least Squares Line Figure 6Regression line and random errors. e Food expenditure Regression line Income
The Least Squares Line a=1,142 b=0,264 Thus, ŷ = 1.1414 + 0.2642x
Figure 7 Error of prediction. ŷ = 1.1414+ .2642x Predicted = $1038.84 e Error = -$138.84 Food expenditure Actual = $900 Income
Figure . Errors of prediction when regression model is used. ŷ = 1.1414 + .2642x Food expenditure Income
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
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
Figure 8 Positive and negative linear relationships between x and y. y y b < 0 b > 0 x x (a) Positive linear relationship. (b) Negative linear relationship.
Linearitas Test(Uji Validitas Model) Table. Validity for Simple Regression Model
Figure Nonlinear relations between x and y. y y x x (a) (b)
Significan level α = 0.05 Reject H0 Reject H0 Do not reject H0 ttable = 2.571 -ttable = -2.571
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.
Construct a scatter diagram for these data. • Find the regression line with experience as an independent variable and monthly salary as a dependent variable. • Give a brief interpretation of the values of a and b calculated in part b. • 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. • Does the regression model show a linear relationship between experience and monthly salary? Use 5 % significant level. • Construct a 5 % significant level for b.
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.
Scatter diagram and the regression line. Insurance premium Experience
Solution .. • The predict value of y for x = 10 is ŷ = 76.6605 – 1.5476(10) = $61.18
Solution … • H0: B = 0 • B is not negative • H1: B < 0 • B is negative
Solution …. • Area in the left tail = α = .05 • df = n – 2 = 8 – 2 = 6 • The critical value of t is -1.943
Figure .. Do not reject H0 Reject H0 α = .01 -1.943 0 t Critical value of t
Solution … From H0
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
Figure …. Reject H0 Do not reject H0 Reject H0 α/2 = .025 α/2 = .025 -2.447 0 2.447 t Two critical values of t