Simple Linear Regression

Slides:



Advertisements
Similar presentations
Simple Linear Regression 1. review of least squares procedure 2
Advertisements

Chap 12-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 12 Simple Regression Statistics for Business and Economics 6.
1 Simple Linear Regression and Correlation The Model Estimating the Coefficients EXAMPLE 1: USED CAR SALES Assessing the model –T-tests –R-square.
Economics 173 Business Statistics Lecture 14 Fall, 2001 Professor J. Petry
Simple Linear Regression and Correlation
Simple Linear Regression
Chapter 14 Introduction to Linear Regression and Correlation Analysis
Chapter 12 Simple Regression
Statistics for Business and Economics
Chapter 13 Introduction to Linear Regression and Correlation Analysis
The Simple Regression Model
Fall 2006 – Fundamentals of Business Statistics 1 Chapter 13 Introduction to Linear Regression and Correlation Analysis.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 13-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
SIMPLE LINEAR REGRESSION
Chapter Topics Types of Regression Models
Linear Regression and Correlation Analysis
1 Simple Linear Regression Chapter Introduction In this chapter we examine the relationship among interval variables via a mathematical equation.
Chapter 13 Introduction to Linear Regression and Correlation Analysis
1 Simple Linear Regression and Correlation Chapter 17.
Economics 173 Business Statistics Lecture 16 Fall, 2001 Professor J. Petry
SIMPLE LINEAR REGRESSION
Lecture 17 Interaction Plots Simple Linear Regression (Chapter ) Homework 4 due Friday. JMP instructions for question are actually for.
Chapter 14 Introduction to Linear Regression and Correlation Analysis
1 Simple Linear Regression Chapter Introduction In Chapters 17 to 19 we examine the relationship between interval variables via a mathematical.
Lecture 19 Simple linear regression (Review, 18.5, 18.8)
Introduction to Regression Analysis, Chapter 13,
Simple Linear Regression. Introduction In Chapters 17 to 19, we examine the relationship between interval variables via a mathematical equation. The motivation.
Chapter 6 (cont.) Regression Estimation. Simple Linear Regression: review of least squares procedure 2.
1 Simple Linear Regression 1. review of least squares procedure 2. inference for least squares lines.
Regression and Correlation Methods Judy Zhong Ph.D.
SIMPLE LINEAR REGRESSION
Introduction to Linear Regression and Correlation Analysis
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 12-1 Chapter 12 Simple Linear Regression Statistics for Managers Using.
1 Least squares procedure Inference for least squares lines Simple Linear Regression.
Statistics for Business and Economics Chapter 10 Simple Linear Regression.
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Statistics for Business and Economics 7 th Edition Chapter 11 Simple Regression Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch.
Keller: Stats for Mgmt & Econ, 7th Ed
Introduction to Linear Regression
Chap 12-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 12 Introduction to Linear.
EQT 373 Chapter 3 Simple Linear Regression. EQT 373 Learning Objectives In this chapter, you learn: How to use regression analysis to predict the value.
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
Chapter 11 Correlation and Simple Linear Regression Statistics for Business (Econ) 1.
Economics 173 Business Statistics Lectures Summer, 2001 Professor J. Petry.
Lecture 10: Correlation and Regression Model.
Economics 173 Business Statistics Lecture 10 Fall, 2001 Professor J. Petry
Chapter 8: Simple Linear Regression Yang Zhenlin.
Statistics for Managers Using Microsoft® Excel 5th Edition
1 Simple Linear Regression and Correlation Least Squares Method The Model Estimating the Coefficients EXAMPLE 1: USED CAR SALES.
Linear Regression Linear Regression. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Purpose Understand Linear Regression. Use R functions.
Lecture 10 Introduction to Linear Regression and Correlation Analysis.
1 Simple Linear Regression Review 1. review of scatterplots and correlation 2. review of least squares procedure 3. inference for least squares lines.
11-1 Copyright © 2014, 2011, and 2008 Pearson Education, Inc.
Simple Linear Regression and Correlation (Continue..,) Reference: Chapter 17 of Statistics for Management and Economics, 7 th Edition, Gerald Keller. 1.
Introduction. We want to see if there is any relationship between the results on exams and the amount of hours used for studies. Person ABCDEFGHIJ Hours/
Simple Linear Regression and Correlation (Continue..,) Reference: Chapter 17 of Statistics for Management and Economics, 7 th Edition, Gerald Keller. 1.
Using the regression equation (17.6). Why regression? 1.Analyze specific relations between Y and X. How is Y related to X? 2.Forecast / Predict the variable.
1 Simple Linear Regression Chapter Introduction In Chapters 17 to 19 we examine the relationship between interval variables via a mathematical.
Chapter 13 Simple Linear Regression
Warm-Up The least squares slope b1 is an estimate of the true slope of the line that relates global average temperature to CO2. Since b1 = is very.
Inference for Least Squares Lines
Linear Regression.
Linear Regression and Correlation Analysis
Chapter 11: Simple Linear Regression
Simple Linear Regression Review 1
Keller: Stats for Mgmt & Econ, 7th Ed Linear Regression Analysis
Simple Linear Regression
Introduction to Regression
Presentation transcript:

Simple Linear Regression

Introduction In Chapter we examine the relationship between interval variables via a mathematical equation. The motivation for using the technique: Forecast the value of a dependent variable (y) from the value of independent variables (x1, x2,…xk.). Analyze the specific relationships between the independent variables and the dependent variable.

The Model The model has a deterministic and a probabilistic components House Cost Building a house costs about $75 per square foot. House cost = 25000 + 75(Size) Most lots sell for $25,000 House size

The Model However, house cost vary even among same size houses! Since cost behave unpredictably, we add a random component. House Cost Most lots sell for $25,000 House cost = 25000 + 75(Size) + e House size

The Model The first order linear model y = dependent variable x = independent variable b0 = y-intercept b1 = slope of the line e = error variable b0 and b1 are unknown population parameters, therefore are estimated from the data. y Rise b1 = Rise/Run Run b0 x

Estimating the Coefficients The estimates are determined by drawing a sample from the population of interest, calculating sample statistics. producing a straight line that cuts into the data. y w Question: What should be considered a good line? w w w w w w w w w w w w w w x

The Least Squares (Regression) Line A good line is one that minimizes the sum of squared differences between the points and the line.

The Least Squares (Regression) Line Sum of squared differences = (2 - 1)2 + (4 - 2)2 + (1.5 - 3)2 + (3.2 - 4)2 = 6.89 Sum of squared differences = (2 -2.5)2 + (4 - 2.5)2 + (1.5 - 2.5)2 + (3.2 - 2.5)2 = 3.99 Let us compare two lines 4 (2,4) The second line is horizontal w w (4,3.2) 3 2.5 2 w (1,2) (3,1.5) w The smaller the sum of squared differences the better the fit of the line to the data. 1 2 3 4

The Estimated Coefficients To calculate the estimates of the line coefficients, that minimize the differences between the data points and the line, use the formulas: The regression equation that estimates the equation of the first order linear model is:

The Simple Linear Regression Line Example 17.2 (Xm17-02) A car dealer wants to find the relationship between the odometer reading and the selling price of used cars. A random sample of 100 cars is selected, and the data recorded. Find the regression line. Independent variable x Dependent variable y

The Simple Linear Regression Line Solution Solving by hand: Calculate a number of statistics where n = 100.

The Simple Linear Regression Line Solution – continued Using the computer (Xm17-02) Tools > Data Analysis > Regression > [Shade the y range and the x range] > OK

The Simple Linear Regression Line Xm17-02

Interpreting the Linear Regression -Equation 17067 No data The intercept is b0 = $17067. This is the slope of the line. For each additional mile on the odometer, the price decreases by an average of $0.0623 Do not interpret the intercept as the “Price of cars that have not been driven”

Error Variable: Required Conditions The error e is a critical part of the regression model. Four requirements involving the distribution of e must be satisfied. The probability distribution of e is normal. The mean of e is zero: E(e) = 0. The standard deviation of e is se for all values of x. The set of errors associated with different values of y are all independent.

but the mean value changes with x The Normality of e E(y|x3) The standard deviation remains constant, m3 b0 + b1x3 E(y|x2) b0 + b1x2 m2 E(y|x1) but the mean value changes with x m1 b0 + b1x1 From the first three assumptions we have: y is normally distributed with mean E(y) = b0 + b1x, and a constant standard deviation se x1 x2 x3

Assessing the Model The least squares method will produces a regression line whether or not there are linear relationship between x and y. Consequently, it is important to assess how well the linear model fits the data. Several methods are used to assess the model. All are based on the sum of squares for errors, SSE.

Sum of Squares for Errors This is the sum of differences between the points and the regression line. It can serve as a measure of how well the line fits the data. SSE is defined by A shortcut formula

Standard Error of Estimate The mean error is equal to zero. If se is small the errors tend to be close to zero (close to the mean error). Then, the model fits the data well. Therefore, we can, use se as a measure of the suitability of using a linear model. An estimator of se is given by se

Standard Error of Estimate, Example Calculate the standard error of estimate for Example 17.2, and describe what does it tell you about the model fit? Solution Calculated before It is hard to assess the model based on se even when compared with the mean value of y.

The slope is not equal to zero Testing the slope When no linear relationship exists between two variables, the regression line should be horizontal. q q q q q q q q q q q q Linear relationship. Linear relationship. Linear relationship. Linear relationship. No linear relationship. Different inputs (x) yield the same output (y). Different inputs (x) yield different outputs (y). The slope is not equal to zero The slope is equal to zero

Testing the Slope We can draw inference about b1 from b1 by testing H0: b1 = 0 H1: b1 = 0 (or < 0,or > 0) The test statistic is If the error variable is normally distributed, the statistic is Student t distribution with d.f. = n-2. where The standard error of b1.

Testing the Slope, Example Test to determine whether there is enough evidence to infer that there is a linear relationship between the car auction price and the odometer reading for all three-year-old Tauruses, in Example 17.2. Use a = 5%.

Testing the Slope, Example Solving by hand To compute “t” we need the values of b1 and sb1. The rejection region is t > t.025 or t < -t.025 with n = n-2 = 98. Approximately, t.025 = 1.984

Testing the Slope, Example Xm17-02 Using the computer There is overwhelming evidence to infer that the odometer reading affects the auction selling price.

Coefficient of determination To measure the strength of the linear relationship we use the coefficient of determination.

Coefficient of determination To understand the significance of this coefficient note: The regression model Explained in part by Overall variability in y Remains, in part, unexplained The error

Coefficient of determination y2 Two data points (x1,y1) and (x2,y2) of a certain sample are shown. y Variation in y = SSR + SSE y1 x1 x2 Total variation in y = Variation explained by the regression line + Unexplained variation (error)

Coefficient of determination R2 measures the proportion of the variation in y that is explained by the variation in x. R2 takes on any value between zero and one. R2 = 1: Perfect match between the line and the data points. R2 = 0: There are no linear relationship between x and y.

Coefficient of determination, Example Find the coefficient of determination for Example 17.2; what does this statistic tell you about the model? Solution Solving by hand;

Coefficient of determination Using the computer From the regression output we have 65% of the variation in the auction selling price is explained by the variation in odometer reading. The rest (35%) remains unexplained by this model.

17.6 Finance Application: Market Model One of the most important applications of linear regression is the market model. It is assumed that rate of return on a stock (R) is linearly related to the rate of return on the overall market. R = b0 + b1Rm +e Rate of return on a particular stock Rate of return on some major stock index The beta coefficient measures how sensitive the stock’s rate of return is to changes in the level of the overall market.

The Market Model, Example Example 17.6 (Xm17-06) Estimate the market model for Nortel, a stock traded in the Toronto Stock Exchange (TSE). Data consisted of monthly percentage return for Nortel and monthly percentage return for all the stocks. This is a measure of the stock’s market related risk. In this sample, for each 1% increase in the TSE return, the average increase in Nortel’s return is .8877%. This is a measure of the total market-related risk embedded in the Nortel stock. Specifically, 31.37% of the variation in Nortel’s return are explained by the variation in the TSE’s returns.

Using the Regression Equation Before using the regression model, we need to assess how well it fits the data. If we are satisfied with how well the model fits the data, we can use it to predict the values of y. To make a prediction we use Point prediction, and Interval prediction

Point Prediction Example 17.7 Predict the selling price of a three-year-old Taurus with 40,000 miles on the odometer (Example 17.2). A point prediction It is predicted that a 40,000 miles car would sell for $14,575. How close is this prediction to the real price?

Interval Estimates Two intervals can be used to discover how closely the predicted value will match the true value of y. Prediction interval – predicts y for a given value of x, Confidence interval – estimates the average y for a given x. The prediction interval The confidence interval

Interval Estimates, Example Example 17.7 - continued Provide an interval estimate for the bidding price on a Ford Taurus with 40,000 miles on the odometer. Two types of predictions are required: A prediction for a specific car An estimate for the average price per car

Interval Estimates, Example Solution A prediction interval provides the price estimate for a single car: t.025,98 Approximately

Interval Estimates, Example Solution – continued A confidence interval provides the estimate of the mean price per car for a Ford Taurus with 40,000 miles reading on the odometer. The confidence interval (95%) =

The effect of the given xg on the length of the interval As xg moves away from x the interval becomes longer. That is, the shortest interval is found at x.

The effect of the given xg on the length of the interval As xg moves away from x the interval becomes longer. That is, the shortest interval is found at x.

The effect of the given xg on the length of the interval As xg moves away from x the interval becomes longer. That is, the shortest interval is found at x.

Coefficient of Correlation The coefficient of correlation is used to measure the strength of association between two variables. The coefficient values range between -1 and 1. If r = -1 (negative association) or r = +1 (positive association) every point falls on the regression line. If r = 0 there is no linear pattern. The coefficient can be used to test for linear relationship between two variables.

Testing the coefficient of correlation To test the coefficient of correlation for linear relationship between X and Y X and Y must be observational X and Y are bivariate normally distributed X Y

Testing the coefficient of correlation When no linear relationship exist between the two variables, r = 0. The hypotheses are: H0: r = 0 H1: r ¹ 0 The test statistic is: The statistic is Student t distributed with d.f. = n - 2, provided the variables are bivariate normally distributed.

Testing the Coefficient of correlation Foreign Index Funds (Index) A certain investor prefers the investment in an index mutual funds constructed by buying a wide assortment of stocks. The investor decides to avoid the investment in a Japanese index fund if it is strongly correlated with an American index fund that he owns. From the data shown in Index.xls should he avoid the investment in the Japanese index fund?

Testing the Coefficient of correlation Foreign Index Funds A certain investor prefers the investment in an index mutual funds constructed by buying a wide assortment of stocks. The investor decides to avoid the investment in a Japanese index fund if it is strongly correlated with an American index fund that he owns. From the data shown in Index.xls should he avoid the investment in the Japanese index fund?

Testing the Coefficient of Correlation, Example Solution Problem objective: Analyze relationship between two interval variables. The two variables are observational (the return for each fund was not controlled). We are interested in whether there is a linear relationship between the two variables, thus, we need to test the coefficient of correlation

Testing the Coefficient of Correlation, Example Solution – continued The hypotheses H0: r = 0 H1: r ¹ 0. Solving by hand: The rejection region: |t| > ta/2,n-2 = t.025,59-2 » 2.000. The sample coefficient of correlation: Cov(x,y) = .001279; sx = .0509; sy = 0512 r = cov(x,y)/sxsy=.491 The value of the t statistic is Conclusion: There is sufficient evidence at a = 5% to infer that there are linear relationship between the two variables.

Testing the Coefficient of Correlation, Example Excel solution (Index)