Presentation is loading. Please wait.

Presentation is loading. Please wait.

Economics 173 Business Statistics Lectures 15 - 18 Summer, 2001 Professor J. Petry.

Similar presentations


Presentation on theme: "Economics 173 Business Statistics Lectures 15 - 18 Summer, 2001 Professor J. Petry."— Presentation transcript:

1 Economics 173 Business Statistics Lectures 15 - 18 Summer, 2001 Professor J. Petry

2 Simple Linear Regression and Correlation Chapter 17

3 17.1 Introduction In this chapter we employ Regression Analysis to examine the relationship among quantitative variables. The technique is used to predict the value of one variable (the dependent variable - y)based on the value of other variables (independent variables x 1, x 2,…x k.)

4 17.2 The Model The first order linear model y = dependent variable x = independent variable  0 = y-intercept  1 = slope of the line = error variable x y 00 Run Rise   = Rise/Run  0 and  1 are unknown, therefore, are estimated from the data.

5 17.3 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.           The question is: Which straight line fits best? x y

6 3 3 The best line is the one that minimizes the sum of squared vertical differences between the points and the line.     4 1 1 4 (1,2) 2 2 (2,4) (3,1.5) Sum of squared differences =(2 - 1) 2 +(4 - 2) 2 +(1.5 - 3) 2 + (4,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 2.5 Let us compare two lines The second line is horizontal The smaller the sum of squared differences the better the fit of the line to the data.

7 To calculate the estimates of the 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:

8 Example – Armani’s Pizza –Armani’s Pizza is considering locating at the U of I campus. To do their financial analysis, they first need to estimate sales for their product. –They have data from their existing 10 locations on other college campuses. –Estimate sales for the University of Illinois, with a college population of 35,000.

9 Example – Armani’s Pizza –Begin by plotting the data –Followed by calculating the statistics of your regression

10

11 Example 17.1 Relationship between odometer reading and a used car’s selling price. –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

12 Solution –Solving by hand To calculate b 0 and b 1 we need to calculate several statistics first; where n = 100.

13 –Using the computer (see file Xm17-01.xls) Tools > Data analysis > Regression > [Shade the y range and the x range] > OK

14 This is the slope of the line. For each additional mile on the odometer, the price decreases by an average of $0.0312 The intercept is b 0 = 6533. 6533 0 No data Do not interpret the intercept as the “Price of cars that have not been driven”

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

16 From the first three assumptions we have: y is normally distributed with mean E(y) =  0 +  1 x, and a constant standard deviation   From the first three assumptions we have: y is normally distributed with mean E(y) =  0 +  1 x, and a constant standard deviation     0 +  1 x 1  0 +  1 x 2  0 +  1 x 3 E(y|x 2 ) E(y|x 3 ) x1x1 x2x2 x3x3  E(y|x 1 )  The standard deviation remains constant, but the mean value changes with x

17 17.5 Assessing the Model The least squares method will produce a regression line whether or not there is a 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: –Testing and/or estimating the coefficients. –Using descriptive measurements.

18 –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. –This statistic plays a role in every statistical technique we employ to assess the model. Sum of squares for errors

19 –The mean error is equal to zero. –If   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   as a measure of the suitability of using a linear model. –An unbiased estimator of   2 is given by s  2 Standard error of estimate

20 Example 17.2 –Calculate the standard error of estimate for example 17.1, and describe what does it tell you about the model fit? Solution Calculated before It is hard to assess the model based on s  even when compared with the mean value of y.

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

22 We can draw inference about  1 from b 1 by testing H 0 :  1 = 0 H 1 :  1 = 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. The standard error of b 1. where

23 Solution –Solving by hand –To compute “t” we need the values of b 1 and s b1. –Using the computer There is overwhelming evidence to infer that the odometer reading affects the auction selling price.

24 Example –Evaluate the model used in the Armani’s Pizza example by testing the value of the slope. You are given:

25 Coefficient of determination –When we want to measure the strength of the linear relationship, we use the coefficient of determination.

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

27 x1x1 x2x2 y1y1 y2y2 y Two data points (x 1,y 1 ) and (x 2,y 2 ) of a certain sample are shown. Total variation in y = Variation explained by the regression line) + Unexplained variation (error)

28 R 2 measures the proportion of the variation in y that is explained by the variation in x. Variation in y (SST) = SSR + SSE R 2 takes on any value between zero and one. R 2 = 1: Perfect match between the line and the data points. R 2 = 0: There are no linear relationship between x and y.

29 Example 17.4 –Find the coefficient of determination for example 17.1; what does this statistic tell you about the model? Solution –Solving by hand; –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.

30 Example –Find the coefficient of determination for the Armani’s Pizza example; what does this statistic tell you about the model? You are given values of SSR = 81702.499, and SSE = 6331.901.

31 17.7 Using the Regression Equation If we are satisfied with how well the model fits the data, we can use it to make predictions for y. Illustration –Predict the selling price of a three-year-old Taurus with 40,000 miles on the odometer (Example 17.1). 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 make predictions for y. Illustration –Predict the selling price of a three-year-old Taurus with 40,000 miles on the odometer (Example 17.1).

32 Prediction interval and confidence interval –Two intervals can be used to discover how closely the predicted value will match the true value of y. Prediction interval - for a particular value of y, Confidence interval - for the expected value of y. –The confidence interval –The prediction interval The prediction interval is wider than the confidence interval

33 Example 17.6 interval estimates for the car auction price –Provide an interval estimate for the bidding price on a Ford Taurus with 40,000 miles on the odometer. –Solution The dealer would like to predict the price of a single car The prediction interval(95%) = t.025,98

34 –The car dealer wants to bid on a lot of 250 Ford Tauruses, where each car has been driven for about 40,000 miles. –Solution The dealer needs to estimate the mean price per car. The confidence interval (95%) =

35 Example –Provide a 95% confidence interval for your Armani’s Pizza estimate from above. You are given the following: = 688.4

36 17.8 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.

37 Testing the coefficient of correlation –When there are no linear relationship between two variables,  = 0. –The hypotheses are: H 0 :  = 0 H 1 :  = 0 –The test statistic is: The statistic is Student t distributed with d.f. = n - 2, provided the variables are bivariate normally distributed. X Y

38 Example 17.7 Testing for linear relationship –Test the coefficient of correlation to determine if linear relationship exists in the data of example 17.1. Solution –We test H 0 :  = 0 H 1 :  0. –Solving by hand: The rejection region is |t| > t  /2,n-2 = t.025,98 = 1.984 or so. The sample coefficient of correlation r=cov(X,Y)/s x s y =-.806 The value of the t statistic is Conclusion: There is sufficient evidence at  = 5% to infer that there are linear relationship between the two variables.

39 Example –Test at the 5% significance level whether a linear relationship exists between student population and pizza sales at the University of Illinois. –How do these results compare to your test of b 1 ?

40 Project I: Finance Application Project simulates the job of professional portfolio managers. Your job is to advise high net-worth clients on investment decisions. This often involves “educating” the client. Client is Medical Doctor, with little financial expertise, but serious cash ($1,000,000). The stock market has declined significantly over the last year or so, and she believes now is the time to get in. She gives you five stocks and asks which one she should invest in. How do you respond?

41 Project I: Finance Application The project is divided into three parts 1.Calculate mean, standard deviation and beta for each asset. –gather 5 years of historical monthly returns for your team’s five companies, the S&P 500 total return index and the 3- month constant maturity Treasury bill. Put in table and explain to client. 2.Illustrate benefits of diversification with concrete example. –You are provided with average annual returns and standard deviations for the S&P 500 and the 3-month T-bill. You create a portfolio with these two instruments weighted differently to illustrate the impact on risk (standard deviation). 3.Analyze impact of correlations on diversification. –Create table of correlation coefficients between all assets, and explain. Select asset pair with r closest to –1. Explain. –Adjust graph in 2 with r = 1, and –1 instead of 0. Explain.

42 Part 1. Finding Beta (17.6 in text) 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 =  0 +  1 R m +  Rate of return on a particular stockRate 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.

43 Example 17.5 The market model Estimate the market model for Nortel, a stock traded in the Toronto Stock Exchange. 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 risk embedded in the Nortel stock, that is market-related. Specifically, 31.37% of the variation in Nortel’s return are explained by the variation in the TSE’s returns.

44 Part 2. Diversification (Ex 6.8, sect 6.7) Investment portfolio diversification –An investor has decided to invest equal amounts of money in two investments. –Find the expected return on the portfolio –If  = 1,.5, 0 find the standard deviation of the portfolio.

45 –The return on the portfolio can be represented by R p = w 1 R 1 + w 2 R 2 =.5R 1 +.5R 2 The relative weights are proportional to the amounts invested. –The variance of the portfolio return is V(R p ) = w 1 2 V(R 1 ) + w 2 2 V(R 1 ) +2w 1 w 2  1  2 –Calculate the portfolio return and risk for  = 0,  = 1 and  = -1

46 –Substituting the required coefficient of correlation we have: For  = 1 : V(R p ) =.1056 =.3250 For  =.5: V(R p ) =.0806 =.2839 For  = 0: V(R p ) =.0556 =.2358 Larger diversification is expressed by smaller correlation. As the correlation coefficient decreases, the standard deviation decreases too.

47

48 17.9 Regression Diagnostics - I The three conditions required for the validity of the regression analysis are: –the error variable is normally distributed. –the error variance is constant for all values of x. –The errors are independent of each other. How can we diagnose violations of these conditions?

49 Residual Analysis –Examining the residuals (or standardized residuals), we can identify violations of the required conditions –Example 17.1 - continued Nonnormality. –Use Excel to obtain the standardized residual histogram. –Examine the histogram and look for a bell shaped diagram with mean close to zero.

50 A Partial list of Standard residuals

51 Heteroscedasticity –When the requirement of a constant variance is violated we have heteroscedasticity. + + + + + + + + + + + + + + + + + + + + + + + + The spread increases with y ^ y ^ Residual ^ y + + + + + + + + + + + + + + + + + + + + + + +

52 + + + + + + + + + + + + + + + + + + + + + + + + y ^ ^ y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + As far as the even spread, this is a much better situation When the requirement of a constant variance is not violated we have homoscedasticity.

53 Nonindependence of error variables – A time series is constituted if data were collected over time. –Examining the residuals over time, no pattern should be observed if the errors are independent. –When a pattern is detected, the errors are said to be autocorrelated. –Autocorrelation can be detected by graphing the residuals against time.

54 + + + + + + + + + + + + + + + + + + + + + + + + + Time Residual Time + + + Patterns in the appearance of the residuals over time indicates that autocorrelation exists. Note the runs of positive residuals, replaced by runs of negative residuals Note the oscillating behavior of the residuals around zero. 00

55 Outliers –An outlier is an observation that is unusually small or large. –Several possibilities need to be investigated when an outlier is observed: There was an error in recording the value. The point does not belong in the sample. The observation is valid. –Identify outliers from the scatter diagram. –It is customary to suspect an observation is an outlier if its |standard residual| > 2

56 + + + + + + + + + + + + + + + + + The outlier causes a shift in the regression line … but, some outliers may be very influential ++++++++++ An outlier An influential observation

57 Procedure for regression diagnostics –Develop a model that has a theoretical basis. –Gather data for the two variables in the model. –Draw the scatter diagram to determine whether a linear model appears to be appropriate. –Check the required conditions for the errors. –Assess the model fit. –If the model fits the data, use the regression equation.


Download ppt "Economics 173 Business Statistics Lectures 15 - 18 Summer, 2001 Professor J. Petry."

Similar presentations


Ads by Google