Lecture 3 Today: Statistical Review cont’d:

Slides:



Advertisements
Similar presentations
Things to do in Lecture 1 Outline basic concepts of causality
Advertisements

EC220 - Introduction to econometrics (chapter 1)
Estimation of Means and Proportions
EC220 - Introduction to econometrics (review chapter)
The Simple Regression Model
Chapter 7 Statistical Data Treatment and Evaluation
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: introduction to maximum likelihood estimation Original citation: Dougherty,
1 XX X1X1 XX X Random variable X with unknown population mean  X function of X probability density Sample of n observations X 1, X 2,..., X n : potential.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: asymptotic properties of estimators: plims and consistency Original.
Quantitative Methods 2 Lecture 3 The Simple Linear Regression Model Edmund Malesky, Ph.D., UCSD.
Lecture 9 Today: Ch. 3: Multiple Regression Analysis Example with two independent variables Frisch-Waugh-Lovell theorem.
Random effects estimation RANDOM EFFECTS REGRESSIONS When the observed variables of interest are constant for each individual, a fixed effects regression.
Lecture 2 Today: Statistical Review cont’d:
MEASUREMENT ERROR 1 In this sequence we will investigate the consequences of measurement errors in the variables in a regression model. To keep the analysis.
ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY
Lecture 4 This week’s reading: Ch. 1 Today:
EC220 - Introduction to econometrics (chapter 2)
The Simple Linear Regression Model: Specification and Estimation
Point estimation, interval estimation
Chapter 4 Multiple Regression.
Statistical Background
Chapter 11 Multiple Regression.
Topic4 Ordinary Least Squares. Suppose that X is a non-random variable Y is a random variable that is affected by X in a linear fashion and by the random.
EC220 - Introduction to econometrics (chapter 9)
1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component 
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: prediction Original citation: Dougherty, C. (2012) EC220 - Introduction.
DERIVING LINEAR REGRESSION COEFFICIENTS
So are how the computer determines the size of the intercept and the slope respectively in an OLS regression The OLS equations give a nice, clear intuitive.
1 This sequence shows why OLS is likely to yield inconsistent estimates in models composed of two or more simultaneous relationships. SIMULTANEOUS EQUATIONS.
1 PREDICTION In the previous sequence, we saw how to predict the price of a good or asset given the composition of its characteristics. In this sequence,
EC220 - Introduction to econometrics (review chapter)
1 UNBIASEDNESS AND EFFICIENCY Much of the analysis in this course will be concerned with three properties of estimators: unbiasedness, efficiency, and.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: sampling and estimators Original citation: Dougherty, C. (2012)
Econ 482 Lecture 1 I. Administration: Introduction Syllabus Thursday, Jan 16 th, “Lab” class is from 5-6pm in Savery 117 II. Material: Start of Statistical.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: conflicts between unbiasedness and minimum variance Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 8) Slideshow: measurement error Original citation: Dougherty, C. (2012) EC220 - Introduction.
CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE
Lecture 3-2 Summarizing Relationships among variables ©
ASYMPTOTIC AND FINITE-SAMPLE DISTRIBUTIONS OF THE IV ESTIMATOR
EC220 - Introduction to econometrics (chapter 8)
CORRELATION & REGRESSION
Prof. Dr. S. K. Bhattacharjee Department of Statistics University of Rajshahi.
Lecture 12 Statistical Inference (Estimation) Point and Interval estimation By Aziza Munir.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
SUPA Advanced Data Analysis Course, Jan 6th – 7th 2009 Advanced Data Analysis for the Physical Sciences Dr Martin Hendry Dept of Physics and Astronomy.
Y X 0 X and Y are not perfectly correlated. However, there is on average a positive relationship between Y and X X1X1 X2X2.
© Christopher Dougherty 1999–2006 The denominator has been rewritten a little more carefully, making it explicit that the summation of the squared deviations.
Simple regression model: Y =  1 +  2 X + u 1 We have seen that the regression coefficients b 1 and b 2 are random variables. They provide point estimates.
Chapter 5 Parameter estimation. What is sample inference? Distinguish between managerial & financial accounting. Understand how managers can use accounting.
Chapter Three TWO-VARIABLEREGRESSION MODEL: THE PROBLEM OF ESTIMATION
Chapter 2 Statistical Background. 2.3 Random Variables and Probability Distributions A variable X is said to be a random variable (rv) if for every real.
1 We will now look at the properties of the OLS regression estimators with the assumptions of Model B. We will do this within the context of the simple.
1 COVARIANCE, COVARIANCE AND VARIANCE RULES, AND CORRELATION Covariance The covariance of two random variables X and Y, often written  XY, is defined.
Estimators and estimates: An estimator is a mathematical formula. An estimate is a number obtained by applying this formula to a set of sample data. 1.
1 Y SIMPLE REGRESSION MODEL Suppose that a variable Y is a linear function of another variable X, with unknown parameters  1 and  2 that we wish to estimate.
Correlation & Regression Analysis
Chapter 8: Simple Linear Regression Yang Zhenlin.
1 ASYMPTOTIC PROPERTIES OF ESTIMATORS: THE USE OF SIMULATION In practice we deal with finite samples, not infinite ones. So why should we be interested.
INSTRUMENTAL VARIABLES 1 Suppose that you have a model in which Y is determined by X but you have reason to believe that Assumption B.7 is invalid and.
1 INSTRUMENTAL VARIABLE ESTIMATION OF SIMULTANEOUS EQUATIONS In the previous sequence it was asserted that the reduced form equations have two important.
1 ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION We have seen that the variance of a random variable X is given by the expression above. Variance.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: simple regression model Original citation: Dougherty, C. (2012) EC220.
1 Ka-fu Wong University of Hong Kong A Brief Review of Probability, Statistics, and Regression for Forecasting.
VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE In this sequence and the next we will investigate the consequences of misspecifying the regression.
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
Nvmrao Three useful results: GOODNESS OF FIT This sequence explains measures of goodness of fit in regression analysis. It is convenient to start by demonstrating.
Lecture 3 Today: Statistical Review cont’d:
Product moment correlation
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

Lecture 3 Today: Statistical Review cont’d: Unbiasedness and efficiency Sample equivalents of variance, covariance and correlation Probability limits and consistency (quick) The Simple Regression Model

SAMPLING AND ESTIMATORS probability density function of X probability density function of X mX X mX X We will next demonstrate that the variance of the distribution of X is smaller than that of X, as depicted in the diagram. © Christopher Dougherty 1999–2006

SAMPLING AND ESTIMATORS We start by replacing X by its definition and then using variance rule 2 to take 1/n out of the expression as a common factor. © Christopher Dougherty 1999–2006

SAMPLING AND ESTIMATORS Next we use variance rule 1 to replace the variance of a sum with a sum of variances. In principle there are many covariance terms as well, but they are zero if we assume that the sample values are generated independently. © Christopher Dougherty 1999–2006

SAMPLING AND ESTIMATORS Now we come to the bit that requires thought. Start with X1. When we are still at the planning stage, we do not know what the value of X1 will be. © Christopher Dougherty 1999–2006

SAMPLING AND ESTIMATORS All we know is that it will be generated randomly from the distribution of X. The variance of X1, as a beforehand concept, will therefore be sX. The same is true for all the other sample components, thinking about them beforehand. Hence we write this line. 2 © Christopher Dougherty 1999–2006

SAMPLING AND ESTIMATORS Thus we have demonstrated that the variance of the sample mean is equal to the variance of X divided by n, a result with which you will be familiar from your statistics course. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Unbiasedness of X: Generalized estimator Z = l1X1 + l2X2 However, the sample mean is not the only unbiased estimator of the population mean. We will demonstrate this supposing that we have a sample of two observations (to keep it simple). Thus Z is an unbiased estimator of mX if the sum of the weights is equal to one. An infinite number of combinations of l1 and l2 satisfy this condition, not just the sample mean (here, li =1/n ). © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY probability density function estimator B estimator A mX Generalized estimator Z = l1X1 + l2X2 is an unbiased estimator of mX if the sum of the weights is equal to one. An infinite number of combinations of lis satisfy this condition, not just the sample mean. How do we choose among them? The answer is to use the most efficient estimator, the one with the smallest population variance, because it will tend to be the most accurate. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY probability density function estimator B estimator A mX In the diagram, A and B are both unbiased estimators but B is superior because it is more efficient. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 We will analyze the variance of the generalized estimator and find out what condition the weights must satisfy in order to minimize it. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 The first variance rule is used to decompose the variance. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 Note that we are assuming that X1 and X2 are independent observations and so their covariance is zero. The second variance rule is used to bring l1 and l2 out of the variance expressions. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY “If l1 + l2 = 1, then, l12 + l22 >= ½.” Generalized estimator Z = l1X1 + l2X2 The variance of X1, at the planning stage, is sX2. The same goes for the variance of X2. At this step, you can use the following result, “If l1 + l2 = 1, then, l12 + l22 >= ½.” to show that the sample mean is more efficient because it has a lower variance. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 Or, you can use calculus as follows: We take account of the condition for unbiasedness and re-write the variance of Z, substituting for l2. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 The quadratic is expanded. To minimize the variance of Z, we must choose l1 so as to minimize the final expression. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 We differentiate with respect to l1 to obtain the first-order condition. © Christopher Dougherty 1999–2006

UNBIASEDNESS AND EFFICIENCY Generalized estimator Z = l1X1 + l2X2 The expression is minimized for l1 = 0.5. It follows that l2 = 0.5 as well. So we have demonstrated that the sample mean is the most efficient unbiased estimator, at least in this example. (Note that the second differential is positive, confirming that we have a minimum.) © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE probability density function estimator B estimator A q Suppose that you have alternative estimators of a population characteristic q, one unbiased, the other biased but with a smaller variance. How do you choose between them? © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE probability density function estimator B q A widely-used loss function is the mean square error of the estimator, defined as the expected value of the square of the deviation of the estimator about the true value of the population characteristic. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE probability density function estimator B bias q mZ The mean square error involves a trade-off between the variance of the estimator and its bias. Suppose you have a biased estimator like estimator B above, with expected value mZ. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE probability density function estimator B bias q mZ The mean square error can be shown to be equal to the sum of the variance of the estimator and the square of the bias. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE To demonstrate this, we start by subtracting and adding mZ . © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE We expand the quadratic using the rule (a + b)2 = a2 + b2 + 2ab, where a = Z – mZ and b = mZ – q. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE We use the first expected value rule to break up the expectation into its three components. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE The first term in the expression is by definition the variance of Z. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE (mZ – q) is a constant, so the second term is a constant. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE In the third term, (mZ – q) may be brought out of the expectation, again because it is a constant, using the second expected value rule. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE Now E(Z) is mZ, and E(–mZ) is –mZ. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE Hence the third term is zero and the mean square error of Z is shown be the sum of the variance of Z and the bias squared. © Christopher Dougherty 1999–2006

CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE probability density function estimator B estimator A q In the case of the estimators shown, estimator B is probably a little better than estimator A according to the MSE criterion. © Christopher Dougherty 1999–2006

ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION Given a sample of n observations, the usual estimator of the variance is the sum of the squared deviations around the sample mean divided by n – 1, typically denoted s2X. Since the variance is the expected value of the squared deviation of X about its mean, it makes intuitive sense to use the average of the sample squared deviations as an estimator. But why divide by n – 1 rather than by n? The reason is that the sample mean is by definition in the middle of the sample, while the unknown population mean is not, except by coincidence. As a consequence, the sum of the squared deviations from the sample mean tends to be slightly smaller than the sum of the squared deviations from the population mean. Hence a simple average of the squared sample deviations is a downwards biased estimator of the variance. However, the bias can be shown to be a factor of (n – 1)/n. Thus one can allow for the bias by dividing the sum of the squared deviations by n – 1 instead of n. The proof is in the appendix of the review chapter. © Christopher Dougherty 1999–2006

ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION A similar adjustment has to be made when estimating a covariance. For two random variables X and Y an unbiased estimator of the covariance sXY is given by the sum of the products of the deviations around the sample means divided by n – 1. © Christopher Dougherty 1999–2006

ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION The population correlation coefficient rXY for two variables X and Y is defined to be their covariance divided by the square root of the product of their variances. The sample correlation coefficient, rXY, is obtained from this by replacing the covariance and variances by their estimators. © Christopher Dougherty 1999–2006

ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION The 1/(n – 1) terms in the numerator and the denominator cancel and one is left with a straightforward expression. © Christopher Dougherty 1999–2006

Probability Limits and Consistency

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 0.08 0.06 0.04 0.02 n = 1 50 100 150 200 X If n is equal to 1, the sample consists of a single observation. X is the same as X and its standard deviation is 50. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 0.08 0.06 0.04 n = 4 0.02 50 100 150 200 X We will see how the shape of the distribution changes as the sample size is increased. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 25 10 0.08 0.06 n = 25 0.04 0.02 50 100 150 200 X The distribution becomes more concentrated about the population mean. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 25 10 100 5 0.08 n = 100 0.06 0.04 0.02 50 100 150 200 X To see what happens for n greater than 100, we will have to change the vertical scale. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 25 10 100 5 0.8 0.6 0.4 n = 100 0.2 50 100 150 200 X We have increased the vertical scale by a factor of 10. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 25 10 100 5 1000 1.6 0.8 0.6 n = 1000 0.4 0.2 50 100 150 200 X The distribution continues to contract about the population mean. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n 1 50 4 25 25 10 100 5 1000 1.6 5000 0.7 n = 5000 0.8 0.6 0.4 0.2 50 100 150 200 X In the limit, the variance of the distribution tends to zero. The distribution collapses to a spike at the true value. The plim of the sample mean is therefore the population mean. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY An estimator of a population characteristic is said to be consistent if it satisfies two conditions: (1) It possesses a probability limit, and so its distribution collapses to a spike as the sample size becomes large, and (2) The spike is located at the true value of the population characteristic. Hence we can say plim X = mX. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY probability density function of X n = 5000 0.8 0.6 0.4 0.2 50 100 150 200 X The sample mean in our example satisfies both conditions and so it is a consistent estimator of mX. Most standard estimators in simple applications satisfy the first condition because their variances tend to zero as the sample size becomes large. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY The only issue then is whether the distribution collapses to a spike at the true value of the population characteristic. A sufficient condition for consistency is that the estimator should be unbiased and that its variance should tend to zero as n becomes large. It is easy to see why this is a sufficient condition. If the estimator is unbiased for a finite sample, it must stay unbiased as the sample size becomes large. Meanwhile, if the variance of its distribution is decreasing, its distribution must collapse to a spike. Since the estimator remains unbiased, this spike must be located at the true value. The sample mean is an example of an estimator that satisfies this sufficient condition. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY Why are we interested in consistency, when in practice we have finite samples? As a first approximation, the answer is that if we can show that an estimator is consistent, then we may be optimistic about its finite sample properties, whereas is the estimator is inconsistent, we know that for finite samples it will definitely be biased. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY Why are we interested in consistency, when in practice we have finite samples? As a first approximation, the answer is that if we can show that an estimator is consistent, then we may be optimistic about its finite sample properties, whereas is the estimator is inconsistent, we know that for finite samples it will definitely be biased. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY However, there are reasons for being cautious about preferring consistent estimators to inconsistent ones. First, a consistent estimator may be biased for finite samples. Second, we are usually also interested in variances. If a consistent estimator has a larger variance than an inconsistent one, the latter might be preferable if judged by the mean square error or similar criterion that allows a trade-off between bias and variance. How can you resolve these issues? Mathematically they are intractable, otherwise we would not have resorted to large sample analysis in the first place. © Christopher Dougherty 1999–2006

ASYMPTOTIC PROPERTIES OF ESTIMATORS: PLIMS AND CONSISTENCY However, there are reasons for being cautious about preferring consistent estimators to inconsistent ones. First, a consistent estimator may be biased for finite samples. Second, we are usually also interested in variances. If a consistent estimator has a larger variance than an inconsistent one, the latter might be preferable if judged by the mean square error or similar criterion that allows a trade-off between bias and variance. How can you resolve these issues? Mathematically they are intractable, otherwise we would not have resorted to large sample analysis in the first place. © Christopher Dougherty 1999–2006

The Simple Regression Model

SIMPLE REGRESSION MODEL Y b1 X X1 X2 X3 X4 Suppose that a variable Y is a linear function of another variable X, with unknown parameters b1 and b2 that we wish to estimate. Suppose that we have a sample of 4 observations with X values as shown. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 Q4 Q3 Q2 Q1 b1 X X1 X2 X3 X4 If the relationship were an exact one, the observations would lie on a straight line and we would have no trouble obtaining accurate estimates of b1 and b2. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y Q4 P1 Q3 Q2 Q1 b1 P3 P2 X X1 X2 X3 X4 In practice, most economic relationships are not exact and the actual values of Y are different from those corresponding to the straight line. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y Q4 P1 Q3 Q2 Q1 b1 P3 P2 X X1 X2 X3 X4 To allow for such divergences, we will write the model as Y = b1 + b2X + u, where u is a disturbance term. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y Q4 P1 u1 Q3 Q2 Q1 b1 P3 P2 X X1 X2 X3 X4 Each value of Y thus has a non-random component, b1 + b2X, and a random component, u. The first observation has been decomposed into these two components. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y P1 P3 P2 X X1 X2 X3 X4 In practice we can see only the P points. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y P1 P3 P2 b1 X X1 X2 X3 X4 Obviously, we can use the P points to draw a line which is an approximation to the line Y = b1 + b2X. If we write this line Y = b1 + b2X, b1 is an estimate of b1 and b2 is an estimate of b2. ^ © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) R3 R4 R2 P1 R1 P3 P2 b1 X X1 X2 X3 X4 The line is called the fitted model and the values of Y predicted by it are called the fitted values of Y. They are given by the heights of the R points. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) e4 (residual) R3 R4 R2 P1 e1 e3 e2 R1 P3 P2 b1 X X1 X2 X3 X4 The discrepancies between the actual and fitted values of Y are known as the residuals. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) R3 R4 R2 P1 R1 b1 P3 P2 b1 X X1 X2 X3 X4 Note that the values of the residuals are not the same as the values of the disturbance term. The diagram now shows the true unknown relationship as well as the fitted line. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) Q4 P1 Q3 Q2 Q1 b1 P3 P2 b1 X X1 X2 X3 X4 The disturbance term in each observation is responsible for the divergence between the non-random component of the true relationship and the actual observation. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) R3 R4 R2 P1 R1 b1 P3 P2 b1 X X1 X2 X3 X4 The residuals are the discrepancies between the actual and the fitted values. If the fit is a good one, the residuals and the values of the disturbance term will be similar, but they must be kept apart conceptually. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y (actual value) P4 Y (fitted value) e4 u4 R4 Q4 b1 b1 X X1 X2 X3 X4 Both of these lines will be used in our analysis. Each permits a decomposition of the value of Y. The decompositions will be illustrated with the fourth observation. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Using the theoretical relationship, Y can be decomposed into its non-stochastic component b1 + b2X and its random component u. Y = b1 + b2X + u This is a theoretical decomposition because we do not know the values of b1 or b2, or the values of the disturbance term. We shall use it in our analysis of the properties of the regression coefficients. The other decomposition is with reference to the fitted line. In each observation, the actual value of Y is equal to the fitted value plus the residual. This is an operational decomposition which we will use for practical purposes. Y = b1 + b2X + e = + e © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Least squares criterion: Minimize RSS (residual sum of squares), where To begin with, we will draw the fitted line so as to minimize the sum of the squares of the residuals, RSS. This is described as the least squares criterion. © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Least squares criterion: Minimize RSS (residual sum of squares), where Why not minimize Why the squares of the residuals? Why not just minimize the sum of the residuals? © Christopher Dougherty 1999–2006

SIMPLE REGRESSION MODEL Y Y P1 P3 P2 X X1 X2 X3 X4 The answer is that you would get an apparently perfect fit by drawing a horizontal line through the mean value of Y. The sum of the residuals would be zero. You must prevent negative residuals from cancelling positive ones, and one way to do this is to use the squares of the residuals. Of course there are other ways of dealing with the problem. The least squares criterion has the attraction that the estimators derived with it have desirable properties, provided that certain conditions are satisfied. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y X Next, we’ll see how the regression coefficients for a simple regression model are derived, using the least squares criterion (OLS, for ordinary least squares). We will start with a numerical example with just three observations: (1,3), (2,5), and (3,6) © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X ^ Writing the fitted regression as Y = b1 + b2X, we will determine the values of b1 and b2 that minimize RSS, the sum of the squares of the residuals. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X Given our choice of b1 and b2, the residuals are as shown. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The sum of the squares of the residuals is thus as shown above. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The quadratics have been expanded. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Like terms have been added together. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS For a minimum, the partial derivatives of RSS with respect to b1 and b2 should be zero. (We should also check a second-order condition.) © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The first-order conditions give us two equations in two unknowns. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Solving them, we find that RSS is minimized when b1 and b2 are equal to 1.67 and 1.50, respectively. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X Here is the scatter diagram again. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y 1.50 1.67 X The fitted line and the fitted values of Y are as shown. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y X1 Xn X Now we will do the same thing for the general case with n observations. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X1 Xn X Given our choice of b1 and b2, we will obtain a fitted line as shown. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X1 Xn X The residual for the first observation is defined. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X1 Xn X Similarly we define the residuals for the remaining observations. That for the last one is marked. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS RSS, the sum of the squares of the residuals, is defined for the general case. The data for the numerical example are shown for comparison. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The quadratics are expanded. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Like terms are added together. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Note that in this equation the observations on X and Y are just data that determine the coefficients in the expression for RSS. The choice variables in the expression are b1 and b2. This may seem a bit strange because in elementary calculus courses b1 and b2 are usually constants and X and Y are variables. However, if you have any doubts, compare what we are doing in the general case with what we did in the numerical example. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The first derivative with respect to b1. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS With some simple manipulation we obtain a tidy expression for b1 . © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The first derivative with respect to b2. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Divide through by 2. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS We now substitute for b1 using the expression obtained for it and we thus obtain an equation that contains b2 only. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The definition of the sample mean has been used. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The last two terms have been disentangled. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Terms not involving b2 have been transferred to the right side. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Hence we obtain an expression for b2. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS In practice, we shall use an alternative expression. We will demonstrate that it is equivalent. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Expanding the numerator, we obtain the terms shown. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS In the second term the mean value of Y is a common factor. In the third, the mean value of X is a common factor. The last term is the same for all i. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS We use the definitions of the sample means to simplify the expression. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Hence we have shown that the numerators of the two expressions are the same. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS The denominator is mathematically a special case of the numerator, replacing Y by X. Hence the expressions are equivalent. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X1 Xn X The scatter diagram is shown again. We will summarize what we have done. We hypothesized that the true model is as shown, we obtained some data, and we fitted a line. © Christopher Dougherty 1999–2006

DERIVING LINEAR REGRESSION COEFFICIENTS Y b2 b1 X1 Xn X We chose the parameters of the fitted line so as to minimize the sum of the squares of the residuals. As a result, we derived the expressions for b1 and b2. © Christopher Dougherty 1999–2006