Docsity

Regression Analysis - Econometrics - Lecture Notes, Study notes of Econometrics and Mathematical Economics

Toggle sidebar
bg1
Lecture 01
The Regression Analysis
The figure shows a scatter diagram showing the relationship
between two variables X & Y. It is obvious that the two
variables have some relationship as the higher values of X
are associated with higher values of Y, however it is also
visible that the relationship cannot be modeled by a
deterministic function of X.
Therefore we assume that the relationship between X and Y
is sum of deterministic and stochastic relationship which can
be written as follows:
๐‘ฆ๐‘–=๐›ผ+๐›ฝ๐‘ฅ๐‘–+๐œ€๐‘–
Where ๐›ผ+๐›ฝ๐‘ฅ๐‘– is deterministic and๐œ€๐‘– is stochastic part. The
deterministic part we hope to be able to predict, however
the stochastic part cannot be predicted.
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Regression Analysis - Econometrics - Lecture Notes and more Study notes Econometrics and Mathematical Economics in PDF only on Docsity!

Lecture 01

The Regression Analysis

The figure shows a scatter diagram showing the relationship between two variables X & Y. It is obvious that the two variables have some relationship as the higher values of X are associated with higher values of Y, however it is also visible that the relationship cannot be modeled by a deterministic function of X.

Therefore we assume that the relationship between X and Y is sum of deterministic and stochastic relationship which can be written as follows: ๐‘ฆ๐‘– = ๐›ผ + ๐›ฝ๐‘ฅ๐‘– + ๐œ€๐‘– Where ๐›ผ + ๐›ฝ๐‘ฅ๐‘– is deterministic and๐œ€๐‘– is stochastic part. The deterministic part we hope to be able to predict, however the stochastic part cannot be predicted.

Obviously, it is desirable to have minimum of the stochastic i.e. unpredictable part. If we ignore the stochastic part we get: ๐›ผ + ๐›ฝ๐‘ฅ๐‘– = ๐‘ฆ๏ฟฝ This is equation of straight line. This straight lines joins the values on X axis with corresponding predictions on Y axis. We want such a straight line which minimizes the unpredicted part. Instead of focusing on any one ๐œ€๐‘– we want to minimize the aggregate error. This is a problem which should be solvable by calculus (differentiation]. Let us see how it can be done.

Minimizing aggregate error: We have ๐‘ฆ๐‘– โˆ’ ๐›ผ โˆ’ ๐›ฝ๐‘ฅ๐‘– = ๐œ€๐‘– There are three options to minimize the aggregate error:

Option I: minimize โˆ‘ ๐œบ (^) ๐’Š This option is not appropriate because ๐œ€๐‘– = ๐‘ฆ๐‘– โˆ’ ๐‘ฆ๏ฟฝ๐‘– Here ๐‘ฆ๏ฟฝ๐‘– is the prediction of ๐‘ฆ๐‘– lying on the straight line. The actual ๐‘ฆ๐‘– are on both sides of straight line. If ๐‘ฆ๐‘– is above straight line => actual value of ๐‘ฆ๐‘– is greater than ๐‘ฆ๏ฟฝ๐‘– => ๐œ€๐‘– is positive. On the other hand, if ๐‘ฆ๐‘– is below the straight line => actual value of ๐‘ฆ๐‘– is smaller than ๐‘ฆ๏ฟฝ๐‘– => ๐œ€๐‘– is negative. These negative and positive values cancel each other and total result we get is zero.

Option III: minimize โˆ‘ ๐œบ (^) ๐’Š๐Ÿ Here the problem posed by the sign of errors is solved by taking squares. The expression is now differentiable and can give us the analytical solution. Let us see how this can be done. Remember the term โˆ‘ ๐œ€๐‘–^2 is called sum of squared residual (RSS). (Residual is sample counterpart of error, there is difference between residual which will be explained later, so far assume that residual and errors are the same thing). So

๐‘…๐‘†๐‘† = ๏ฟฝ ๐œ€๐‘–^2 = ๏ฟฝ(๐‘ฆ๐‘– โˆ’ ๐›ผ โˆ’ ๐›ฝ๐‘ฅ๐‘–)^2

We want to minimize RSS by changing ๐›ผ and ๐›ฝ, therefore: Differentiating w.r.t. ๐›ผ, we get ๐œ•๐‘…๐‘†๐‘† ๐œ•๐›ผ =^ โˆ’^2 ๏ฟฝ(๐‘ฆ๐‘–^ โˆ’ ๐›ผ โˆ’ ๐›ฝ๐‘ฅ๐‘–) = 0 ๏ƒฐ โˆ‘ ๐‘ฆ๐‘– โˆ’ ๐‘›๐‘Ž โˆ’ โˆ‘ ๐›ฝ๐‘ฅ๐‘– = 0 ๏ƒฐ ๐‘›๐›ผ = โˆ‘ ๐‘ฆ๐‘– โˆ’ โˆ‘ ๐›ฝ๐‘ฅ๐‘– Similarly, differentiating with respect to ๐›ฝ we get: ๐œ•๐‘…๐‘†๐‘† ๐œ•๐›ฝ =^ โˆ’^2 ๏ฟฝ(๐‘ฆ๐‘–^ โˆ’ ๐›ผ โˆ’ ๐›ฝ๐‘ฅ๐‘–)๐‘ฅ๐‘–^ = 0 ๏ƒฐ โˆ‘ ๐‘ฆ๐‘– ๐‘ฅ๐‘– โˆ’ ๐‘Ž โˆ‘ ๐‘ฅ๐‘– โˆ’ ๐›ฝ โˆ‘ ๐‘ฅ๐‘–^2 = 0 ๏ƒฐ โˆ‘ ๐‘ฆ๐‘– ๐‘ฅ๐‘– โˆ’ (^1) ๐‘› (โˆ‘ ๐‘ฆ๐‘– โˆ’ โˆ‘ ๐›ฝ๐‘ฅ๐‘–) โˆ‘ ๐‘ฅ๐‘– โˆ’ ๐›ฝ โˆ‘ ๐‘ฅ๐‘–^2 = 0 ๏ƒฐ ๐‘› โˆ‘ ๐‘ฆ๐‘– ๐‘ฅ๐‘– โˆ’ โˆ‘ ๐‘ฅ๐‘– โˆ‘ ๐‘ฆ๐‘– + ๐›ฝ(โˆ‘ ๐‘ฅ๐‘–)^2 โˆ’ ๐‘›๐›ฝ โˆ‘ ๐‘ฅ๐‘–^2 = 0 ๏ƒฐ ๐›ฝฬ‚ = ๐‘› โˆ‘ ๐‘ฆโˆ’(โˆ‘ ๐‘ฅ^ ๐‘–^ ๐‘ฅ (^) ๐‘–^ ๐‘–)^ โˆ’โˆ‘ ๐‘ฅ (^2) +๐‘› โˆ‘ ๐‘ฅ^ ๐‘–^ โˆ‘ ๐‘ฆ (^) ๐‘– 2 ๐‘– Here ๐›ฝฬ‚ is used to denote estimate from the sample. Using this value, one can find ๐›ผ as well.

๐›ผ๏ฟฝ =^1 ๐‘› ๏ฟฝ๏ฟฝ ๐‘ฆ๐‘– โˆ’ ๐›ฝฬ‚ ๏ฟฝ ๐‘ฅ๐‘– ๏ฟฝ

Example 1: Given the data X Y 10 8 12 7 14 13 16 14 18 15 20 19 Estimate the regression equation ๐‘ฆ๐‘– = ๐›ผ + ๐›ฝ๐‘ฅ๐‘– + ๐œ€๐‘– Solution: X Y XY X^ 10 8 80 100 12 7 84 144 14 13 182 196 16 14 224 256 18 15 270 324 20 19 380 400 โˆ‘ (^) ๐‘ฅ๐‘– = 90 โˆ‘ (^) ๐‘ฆ๐‘– = 76 โˆ‘ (^) ๐‘ฅ๐‘– ๐‘ฆ๐‘– = 1220 โˆ‘ (^) ๐‘ฅ๐‘–^2 = 1420

๐›ฝฬ‚ = ๐‘› โˆ‘ ๐‘ฆโˆ’(โˆ‘ ๐‘ฅ๐‘–^ ๐‘ฅ๐‘–^ โˆ’ โˆ‘ ๐‘ฅ๐‘–^ โˆ‘ ๐‘ฆ๐‘–

๐‘–)^2 +^ ๐‘› โˆ‘ ๐‘ฅ๐‘–^2

= 7 ร— 12207 ร— 1420^ โˆ’ โˆ’^ 90 ร— 76 1420 =^17001840

Now

where actual value of y should lie, but we will learn this technique later. Exercise Three data sets are given to you. For the first data set:

  1. Enter the data in Excel spreadsheet
  2. Make a scatter diagram and comment what type of regression do you expect? What are rough guess about slope and intercept of the each of the data?
  3. Calculate the regression equation using the formulae given above and write results.
  4. Summarize the information present in the regression equation; take help of example 1 in this regard.
  5. Predict value of Y when X=
  6. Repeat the exercise for second and third data sets

Set 1 Set 2 Set 3

X Y X Y X Y

4 7 6 -3 7 2 1 4 7 -4 3 2 7 9 2 1 5 3 5 9 3 0 2 1 5 6 2 -1 1 4 1 3 7 -3 6 6 3 5 1 1 7 3 7 11 3 1 5 5 4 8 7 -6 6 1 1 2 2 2 2 7 7 8 1 2 4 1 1 3 2 0 2 5 2 6 3 -1 4 7 4 8 1 0 6 5 6 10 1 2 1 3