Economics 421/521 - Econometrics - Winter 2011 - Lecture 1 (HD)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is economics 421 condom metrics unless I'm in the wrong place one day actually was sort of embarrassing so let's go over the syllabus first and then we'll get on to the first lecture you can see it I'm a guy you want to spin ten weeks with or not find that out so again the syllabus I'm not going to hand out a paper copy can be found through blackboard and when you go in through blackboard I don't know if your interface looks like mine but the class webpage great not working oughta just come right up when you go to blackboard tell it no when it asks this question only asked it in IE but this is way you want to be able to get to the syllabus not ones for visual from it for today I'll move over to a different version this one but you can get to the syllabus through your blackboard I'll put the grades up on there and most of the things like that but most of my communication with you will come through this webpage and so you can get the address it's listed up there so go to blackboard get the address it's a cons of you doctype addcom slash economics 421 but if you go to google and just economics 421 this class will come up the first list and so you can find it that way too I filmed this class I put the videos on YouTube I'll talk about the minute and the last time I did at the first that they have over 100,000 views and so it was a high ranking Google so it's pretty easy to find and so so my name is Mark Toma my office hours are there I'm in PLC 471 get off the elevator and you got to turn right and you'll find me pretty easily my office hours are there they're going to be after this class says 1:30 usually people have questions and things takes a little longer than that so I'm expecting it might be 135-140 but I'll stay for an hour no matter what my next class is at three o'clock so it's right down off my office so I'm going to be there the whole time between classes any other time is just fine to drop by quite honestly you won't find me there at 8:00 a.m. I'm sort of a later morning person but in the afternoons late afternoons late mornings I should be there most the time I don't have any profit all with you dropping by that sort of thing if I'm there great the best thing to do is just send an email and set up an appointment if you want to to talk to me and I'll do my best to meet with you all we're going to have projects in this class there's a hundred of you or there were less time I checked that's going to put a lot of pressure on us and so we'll do our best that I may at some points if it gets overwhelming try to push some of this off to the GTF so I'm going to select the GTFS I gave this class some good ones or at least I tried to and so hopefully we can we can put some of the immersion on them if I'm not able to meet it all do my best though but don't be afraid to check with the GTS because they ought to be very helpful as well um what else should I say I talked about the webpage there it is the class webpage course description I'll say a lot about that in a few minutes and so I'm going to skip over there the text is this one by Daugherty I quite honestly I'm not the biggest fan in the world of this book I think it's a little bit too simplistic in some places that's fine we'll fill in the holes but making you buy another 150 dollar book or whatever they cost these days for the marginal benefit you'd get from switching over to bub what I could do anyway seemed very minor and so I decided to stick with this book I'll follow the book closely but sometimes it may enhance what's here because sometimes I don't think it goes into enough detail to explain things of beauty intuition give you the things you need to actually do this stuff all right so we're going to use the same book we shouldn't have to buy any more if you have this last quarter and we'll fix any shortcomings in class what else the prereqs recon 420 you will want to have had that I think this would be pretty hard without it the class has labs those are the instructors Holden and Tang they all those two also did this last quarter the person who did this last quarter borrowed my notes and my problem sets and all of that and so they've already been through all this once including all the problem sets and everything so they're well-prepared we'll do a lot in labs we'll turn in homework as homeworks that pass exams back we'll go over procedures we'll do all sorts of things so it's something you probably want to attend I'm not going to take formal attendance but the things we do in lab of course part of the class so you want to love you'll want to go so there's a midterm and a final the midterm is going to be on February 3rd that's Thursday of week 5 I'd like to do it in week 6 on that Monday after the weekend but I'm going to be gone that day going to the New York Fed for a conference and so we'll have it that day the final I don't make the final schedule I am NOT a morning person and Friday is the worst day for finals but it's at Friday at 8 a.m. and I simply do not give finals early and so if you've got plane tickets or someone's going to make you come home you need to leave town early this is not going to be the class for you you're going to need to find other arrangements people are sick good things if I ever get makeups I give them after than ever before so final the reason is one person can find out what's on the final until 50 people really pollute the exam if that person finds up what's the on the exam I've got 1/100 of a problem that's not such a big problem so making people take it after the file is way safer from from a security point of view and that's my reason that so Michael is in 8 a.m. Friday of finals we will deal with that there's going to be an empirical project in this class Oh there'll also be some homeworks along the way as well the midterm is 30 the final sporting love homeworks that count for part of the grade got it there somewhere I'm seeing the empirical projects 15 percent of the the grade and we'll have a lot more to say about that along along the way what I found in doing this course over the years is that you tend to put it off to the last week's so I'm going to do is have benchmarks along the way you're going to have to have certain things done by certain points in time and that will keep the project on track for all of these so that by the last week you won't have this rush to try to get it done nevertheless the last week is going to be a crush for all of us but we'll do our best to get you ready beforehand right by having some benchmarks and things you need to do along the way but again I'll have handouts on the project what we expect what questions to answer how long it should be what the design will be all that sort of thing will be will be given out later so it shouldn't beginning anymore there shouldn't be any uncertainty about what you're supposed to do once the time comes to start writing it the computer labs we're going to use eviews again this thing it's fine you should all have it from last quarter it's installed in the Sissel lab and elsewhere so I think I don't need to say much about that you should know how to run that fairly well there's the homeworks 15 percent of your grade there's a tentative course outline there it's short one you're going to want to get familiar with this webpage because on this right-hand sidebar over here there are some useful things my office is there my email the GTF offices their email their office hours I don't have them all yet but I'll get them on there soon then these categories are useful for instance if you want the old midterms you can just click on that and it should bring up all the old midterm that I've never given in this class if you want to see what I've done in the past you can get the passport so here's the winner Oh nine course for instance oh shoot I'm in a 64-bit system and YouTube doesn't play sorry okay we're good you're wrong yes so each day I put up the materials for each class what we're going to cover what we cover next time that sort of thing and then I'll post the videos from each class through YouTube here the homeworks will be on the webpage you want to know what homeworks you're going to get you can go to the past class you want to get ahead of the thing of the curve I'm going to give the same homeworks I gave in the past there's the project things I was talking about this is one of the handouts okay so all this will be posted on the class web page and you'll want to get used to looking into that so again there's review materials on there if you want to know we're going to cover in the class you can hit review when the final comes great I'll put up all the topics for the final so it'll be review and all sorts of stuff so so take a look at that sidebar get used to the information there because it's going to be useful for you if you want a really detailed syllabus look at this topics for the final and the removed from last time now I'll tell you exactly everything we're going to cover in this course in the order that we covered it okay anything else there there's a link to my blog I have an economics blog I just put this up a little while ago if you want to look in on it that's great but it's not part of the class it's a lot of my personal opinions it gets about 20,000 visitors a day it's pretty active picks a lot of my time then there's a link to it there and that's all I'm going to say about that anything else on here but there was something else they wanted to say okay any questions about all that what did I forget to say y'all behaving really well today there's one thing I should warn about I'm a little bit picky about class oh good we love you notes for exam No now sorry where's that I can spoil those Tigers spoiled us oh yeah probably so we can explain that later I can justify my reasoning for that but I just think it's better there's a lot of intuition to be gleaned from the formulas and there's a lot of learning that goes on in that memorization process so I'm not at all a fan of doing that I think you learn much much more maintain much more without those the questions themselves that are not going to be formula dependent in a large way so it's going to be doable without your notes lots of people take this course and lots of people get A's every quarter is same number people seem to get A's and so you'll be okay there is a curve there's definitely a curve in fact the way I grade is I just put I take the things I sort the scores I take a certain percent a B C there's some guidelines on our A's and B's I draw the a be lying we have a guideline in the department should between these percentages I find a nice gap draw that line draw another one so it's purely in in order that way if I have hard or easy GTFS because they do the grading the mean can vary by GTF five ten points as long as as long as the distributions right this does this is insulated against its location sorry disappoint you okay I am going to assume in Highbury number two white right big last time I taught it biggest I taught this at UC San Diego one time than 300 people they had to use great big railroad chalk to write things I went up there last night looked at the board from the back row it's pretty hard to see it was pretty hard to see from these corners over here where you guys are so I'll try to write big but if I'm not writing big enough for you all to see you're gonna have to let me know I'll do my best but I may forget that I don't have 30 people in my econometrics class so we'll do the best the video ought to be clear if you don't get it to class I'm going to assume basic familiarity with you're familiar with the basic linear regression block beta 1 plus beta 2 X 2 I plus beta 3 X 3 I plus beta to the K X K I plus py so presumably you learned about that basic regression line last time basic regression model and you learned about the assumptions that were needed for the estimators of that model the optimal this this property called blue that's linear unbiased estimators we'll come to that in a moment basically for now you learned about this model and then you learn about how to estimate this bar so if it was a two variable case where you just had y equals beta 1 plus beta 2 X 2 I plus UI there's some scatter of points out there and what you want to do is to find the best fitting line for these points so you're given a set of data on x and y and given that set of data you want to find the best possible fitting line and you want to know about its properties what are the properties of this model now there are two uses of regression models so we estimate these models for this there's actually one more but I'm going to talk about two there's two main reasons why we look at these models one is to test hypotheses to test theories about how the world works we want to know how money a change in the money supply affects GDP affects interest rates effects unemployment we've got theories about how that works if you've been paying attention to those we have competing theories about how that works presumably we can use tests to discriminate among competing theoretical models and find the ones provide the best fit the best possible explanation for the world and presumably that then help us understand how the world works this says it works this way this says it works that way we estimate a model do some sort of test we favor this model ah the world more likely works this way than that way so academics are mostly interested in using regression models to learn about the world and how it works you can also use these models for forecasting people in the business community are more interested in using regression models to forecast what interest rates will be in the future what unemployment rate will be in the future what GDP might be in the future they also need a model and so this group of people uses these models for different purpose and in fact we'll find out later that these people are more or less likely to worry about the forecasters bias it's possible to have an estimator to have a forecast it's a little bit off it's biased but has a really low variance it's pretty good versus an estimator that's on the button that has a huge variance so one might be a little tiny bit off but very close to the truth the other one might be centered on the truth but very high very high variance forecasters often will choose the biased estimator because it has a narrower forecast error but academics wouldn't be interested in that at all because they want to know what is the multiplier and a biased estimate or multiplier is not useful it doesn't add your knowledge to the world and so if you want to say well what is what's the exact truth your mother said using unbiased estimators to learn about what the actual number is rather than these biases but what will come to those things as we go through the course the main thing now is just to realize that there's these two separate uses of models we're going to focus mostly on this first one which is the use of a models to test how the world works but just be aware that there's also this forecasting step Tim doing teaches econ 422 which is all about forecasting that's sort of next step developing these models okay to get the best answers to these questions right big we need the best study model so how do you get down particularly for this person so how do you find the best fitting model well there's three steps involved the first step is to specify the model I call the specification model so far we pretty much I'm not sure how much Jeremy did on this with solar pipe turn but so far you've probably assumed you had the correct model you did a little bit or omitted variables a little bit on the inclusion of extraneous variables I believe in Jeremy's class which our model miss specification topics but I don't think you really got into model miss specification too much should you use lags of a variable how many X's should you include should i law the variable should I square it should I use an interaction term x2 times x3 when winter local should I use 1 over X as my variable or X itself is some difference why don't we stop why do we use the log of X so much what's the advantage of specifying the model of logs should we use squares of variables will run wage regressions in this class we'll find out if you leave out wage squared you're going to get really really bad estimates you're not going to learn about the world because you start with a misspecified model how do you know that age squared is supposed to be in there how do you find that out how do people discover the fact wage squared that's in the part of a regression model and this is something you'll confront head-on when you try to do your projects you'll try to figure out what what variables are in there and what data do I have so you might have the perfect model in mind you have to look for data there so data on but there's something close if I use something close to the true piece of data is that okay I use something that's measured with air is that okay suppose I need you know some variable suppose I need the ex-ante real interest rate which is what matters in economics but all I can get from the data is the ex-post real rate is that a problem how does that affect the estimation if I specify the model incorrectly what kinds of problems do I get so we'll want to talk about that how do you have you write down the best fitting model how do you write down the proper model how do you test that it's a proper model what do you just something like for instance the Akai ek information criteria as a way of looking at the specification we'll get a way to test whether we should include this variable in the model or not to test whether m2 should have three legs or four legs if I need to use lags of money because there's persistence how do I know whether to use three four five six or seven lakhs where do I stop all those kinds of questions will have to confront head-on as we look at this specification step we'll also have to worry about the error term which I lost what's what's the right way to specify this error term what if it's not normally distributed what if it follows some other distribution you've mostly assumed you have normally distributed error that gives you T's and FS and all kinds of nice distributions what if your error is distributed some other way is that something we can overcome with modeled specification and so there's just lots and lots of lots of issues that we'll need to work out here as we as we talk about specification now once we have the model specified the next step is estimation so assume for now that we have the correct model we've managed to write down a model that's maybe not perfectly good enough we have a decent model here probably estimated well we're going to have to learn all sorts of different estimators in here let's talk about estimation just just briefly here as we use a guard so remember that our goal is to fit a line to a bunch of data so we have this scatter plot of data and we fit a line now if I just pick one data pointer and I measure this distance this is the true line the true relationship this distance this is the observation in my data this is X I Y I so this is X 7 and y 7 something like that x11 and one just some point then this distance here is the error term so this distance between the observation and the true line is the error in the relationship so KY i equals beta 1 their constant plus beta 2 x 2 i plus UI so this true line is the beta 1 plus beta 2 x 2 i and then we have this error gone now what you learn to do was you would minimize the sum over all your observations letís end probably Jeremy's a time series gosh they probably use cap teased a lot for these ends mostly ends minimize over all the day to the some of the UI squares and you would pick theta 1 theta 2 or bay all the betas if it's a bigger model all the data's you pick the Thetas to minimize the sum of squares what is this when you had like a x squared plus y and algebra over the summer squids oh that's a distance measure right that's how you measure distance so what are we actually minimizing or forget about the math what do we minimize it the distance between the line and the points we're finding the line it's the minimum squared distance between the points between the Y to the point so we're just minimizing the distance add up all these distances and square them you'll get you'll get the least-squares estimator that you talked about that's not the only estimator why not look at the absolute value of the error instead of a square why not minimize the absolute deviation instead of the square why not minimize this to the fourth that's going to penalize outliers even more or the sixth eighth Weisinger this is called this is the least squares estimator this is called a mad estimate if you if you minimize the sum of the deviations we won't do this but that's called an ad estimated minimum absolute deviation the point is that the way you do these things there's there's more than one estimator you learned about the OLS estimator the OLS estimator minimizes these sums of squares but that's just one a whole bunch of estimators out there there's also a minim absolute deviation estimator there's other any you can use any measure of distance here and you just want to minimize that distance is just another measure of distance so all sorts of s as well fortunately it turns out that this one we already know something a lot about this this one's blue it's the best linear unbiased estimator there is no estimator that's linear it has a smaller variance than this one and so we use this one because because it has some very very nice properties but these other estimators could be useful in other situations but anyway the point is that there's lots and lots and lots of different estimators we're going to still focus on the least squares estimators I just wanted to make you aware of this yeah I just want to make you aware the fact that there's other estimators and we're going to look at some other things like instead of going all ass we'll do things called Els look at different sorts of estimators out there and so that they're in this class we're going to look at a variety of different ways to estimate this line over and above what you've already learned which is the OLS estimator okay so why do we have to do that we make sure the reason why we're going to need all of these different estimators is that sometimes we have these assumptions that make them on the right there's ten of them I live them down in a few minutes if those assumptions are satisfied we know we have the best linear unbiased estimator so as long as these assumptions are true the OLS estimator is the best estimator did you can get linear estimator if your errors are normal it's the best non linear estimator as well it's the best estimator that there it is but if one of those assumptions is violated and we'll talk about this assumption then then that estimator may not be best anymore there may be other estimators that are better so if you have correlation between the right-hand variable and the error if you have serial correlation if you have heteroscedasticity if you have all sorts of problems that we're going to talk about during the course this estimator is no longer valid it's not that without that's not best and so we're going to have to figure out ways to come up with other estimators it will involve the same procedure operator this kind of stuff we will have to come up with different estimators for different violations and we'll say more about that Oh so win the assumptions the gauss-markov their hope that's what your products are satisfied OLS estimators are blue we're going to go through this letter by letter so we'll get to those assumptions in a second assume they're satisfied what does blue means what's the BB what's what's the B and blue standpoint best so what do we mean by the best estimator and that's actually lowest variance Louis barium jim it's a minimum variance estimated so what we can do is we can take estimators and we can write down their distribution so that an estimator may have and the errors are normal the estimator would be normal let's Center it on the truth so maybe were flipping coins and you don't know if it's fair and you're trying to estimate the probability of heads and tails one what you don't want you know the other so you put the coin twenty times this number is going to be ten right we should give ten heads and ten tails so the mean should be ten call it a head one and a tail zero so the mean should be ten but in any given twenty flips we could get six or nine or excuse me 12:19 play Yahtzee this morning got over 300 stupid iPhone and so estimators have a distribution we can measure that just by theoretically or we do it empirically flip the coin map out the frequencies you might have two different estimators both centered on the truth both of which are unbiased this one though as a smaller variance in this one which one's better this one they're both going to be true on average they're both going to give you the right answer on average but this one's going to be wrong time after this need symmetric you have to deal with my crappy art so that's just I'll do my best this one's better because it's closer on average of smaller bearings best means there is no distribution that's tighter around data and this one so the OLS estimator is as tight as it can possibly be as you get bigger and bigger and more data these things get tighter and tighter but there's a limit for any given N on how tight this would be if if an amount of data that collapses to the truth for a given n you want to choose the estimator that has the smallest rips that's best L is linear okay what do we mean by that this one's kind of hard to explain it so stick with me for a second when you minimize the sum of squares I'm going to use a two variable up Y in x case just to make but simple just to show you what we mean by linear but this you can do the same thing with a multivariate model using linear algebra I'm going to use regular algebra so I need to use a small easy example so you learned that the estimator for beta if I have the log of Y I in Spain a 1 beta 2 X 2 I plus UI you learned that beta 2 half is the sum of the X minus X bar 1 minus y bar over the sum of the X I minus X bar squared now it was the OLS estimators so we won't call it beta hat OLS is we're going to different estimators that mean GLS or something else later on so we'll start with OLS is on most things at some point for now it's not that important now you probably also wrote this and this will make it easier I don't have to do this to show the linearity property but it's gonna make it simple I can write this is some of the X I Y I over the sum the X R squared I mean for these of these small letters and those big letters I'm not going to go to small people anything but these are these are deviations from the mean so this is just in deviations from the inform let alpha I be X I over the sum of the X is squared so I took the normal OLS estimator wrote it in deviations from mean form and now I just want to make a substitution that's all I wanted is this is just some number right this is a sum from 1 and the X I Squared's we flipped a coin this these are just the X's so he's animal this is just a number this is the only thing that changes without it but anyway so we can write the estimator than beta hat OLS as the sum of the altai while that's what we mean by linearity this estimator is linear and why there's no y squares here there's no it's just the sum of a coefficient on Y coefficient poetry's or so that's a linear operator saying there's a mathematical test of linearity we will go through but when it's in that form is linear sometimes there are nonlinear estimators that are better when we do OLS this estimate this is the best linear estimator the best estimator of this form but sometimes there are estimators in another form that are better we're going to look at something later called autoregressive conditional heteroscedasticity it's one angle and ranger at use of san diego got the Nobel Prize or and all it is it just means that the variance changes over time and it fluctuates it in a persistent way so the variance moves over time OLS is still the best estimator for that model of linear estimators but there's a nonlinear estimator that can be infinitely better than the linear estimator so that's a case where the linear estimator is still best but there exists a non linear estimator that's even better and so it's not always the case that this is the best estimator it's only best linear there might be one of this form of I squared that would be a model in your estimator it's not linear in use if the errors which I've erased these things are normally distributed then you know that this is best normal in your tube but those are not normal as they are an arch model then because the variance moves various has a built in a normal distribution so these aren't normal there's a different estimated expanding okay I'm biased okay what's you stand for goodbyes yeah you very new riddance to we already talked about this a little bit you might have one estimator is unbiased it looks like that there's your unbiased estimate centered truth what is unbiased mean mathematically the expected value of they have equals beta now a lot of you have this thing about math and don't want to be in here I'd rather be taking it on there class I'm going to do my best to not make that stumbling block here so I want you if you're really afraid of these things when you see this ease forget about expectation man they say on average on average beta habitable zeta that's all it means the rest is just showing it it's just with on average I do this enough times the average will be the truth when you measure a variance it's the sum of the Y I minus y bar squared over in that's just the average square deviation just the average square that's what the variances it's not very the students fit a lot of you aren't going to be using this stuff in the future and you get a real job someday and you're going to be saying yourself during this or so I don't have to learn all these stupid formulas and not get a cheat sheet I'm not going to use this crap ever in my life what's the point of it why make me learn it what we hope is it even if the technical apparatus leaves you in the future the ideas will remain when someone sometime in the future is presenting a chart in a sales meeting and saying look here's our advertising versus sales here's the data here's a line that goes through it look how wonderful this is and you say to yourself you know the errors in this model or probably you won't say see record of it it's probably the case you have persistence in here it's smaller probably has some persistence in it when that happens I remember that you can't trust these models in fact if there's persistence in the error terms in these models then this doesn't need to make any sense to say this is an important relationship and you'll be able to ask questions that you couldn't ask otherwise about presentations of data even if you forgot all of the technical parts of it and a lot of you will be in those kinds of meetings so this ought to give you an approach to data and the ability to ask the kinds of questions you need to ask when you're trying to do analytic things or understand analytic presentations or make decisions in a business you know you see you know you're running a business or you're doing some job and you see two variables are related you want to know how much you can trust the strength of that relationship well you'll have some idea about how much you can trust that from the things we're going to do so hopefully even if you forget about all the technical stuff the rest of it will still be still be useful but in any case let's get back to unbiased so unbiased here's an unbiased estimator here's a biased estimator this is the forecaster versus academic you might as a forecaster not mine that you're finding that number instead of that limit because you're so close to the truth someone using this yesterday you know they're going to be went off maybe further off and you are most the time you're making bets in a financial market you might want to be as close as you can get even if there's a little bit of an error and so a forecaster might accept this estimator we though if they found ourselves unbiased estimators this is the best unbiased estimator but it doesn't say there's not a better biased estimator sometimes there is often nervous but OLS will still within this on - estimator and then in what's a estimator that's just a rule for processing the data there's a rule tells you what to do with a day okay so what assumptions are required for a bottle to do and then what the course is all about is going through these and saying look it's probably not the case you can expect that these assumptions are going to be true so what if they're not what do you do how do you get the best estimator when the gauss-markov there are no longer holds so these assumptions are always true there'd be no need for this class they rarely larger and so we need to know how okay so one substance there are ten of these are needed to ensure fast moving is I guess that's a question not a statement it's the first one all right regression the regression model is linear in the parameters your Alex what's that mean really mean by that is that model linear in the parameters no so this is an example model it's not linger the parameters that model is not a good model what about toes I did this one beta 1 plus beta 2 times 1 over X 2 plus you that model okay that's all is fine because it's linear the parameters are just coefficients x 1 coefficient times a value so believe the linearity is about the beta is not the X's if I had y equals beta 1 plus beta 2 X 2 plus beta 2 beta 3 X 3 plus you are that's not linear in parameters it's not parameter parameter x value but so so this is not ok no that's okay you know if I did it this way though why I equals beta 1 plus beta 2 X 2 plus beta 3 2x3 plus UI add an interaction term between X 2 minutes that's fine so linearity has nothing to do the X's it's about the babies again there's a mathematical way to do this I'm not going to do I think you get the idea home from that second the x-values our fists in repeated samples I think that's what said yes and repeated Sam what this says is the exes are non-random the exes are chosen they're not random variable somebody chooses the accents classically what you do in a classical regression setup you would pick the treatments the exes in advance so in advance you pick say ten treatments for the exes you'd apply those treatments repeatedly and observe what happens to the Y's so you can do this you would actually pick say for values then this might be x equals four so you hit the system if you give them experiment in X of four and then you observe the operands monkey missile 20 times then you take the next one X is 6 into 20 times and so on then when you're all done you fit a line through the points ma and I took a whole class as an undergraduate at Cal State Chico and up to the whole class on how to pick the exits of experimental design so you can spend 14 weeks just pretty much on how to pick these X's optimally but the point you are though is their their chose and they're not random variables now that is a very bad assumption often in economics our variables are in fact random on my hand side they're not fixed what do we do then is OLS still okay pins and we'll see what you can do we may have to use sometimes what are called instrumental variables estimators in this case so when the X's are random sometimes willing to use instrumental variables estimators to solve the problem but again the point is that these taxes have to be fixed that's the assumption that's not true sometimes OLS is okay and sometimes it's not and we'll go through when it is music as we go through the course okay one good example of when the X's are non random is when they're measured with air suppose that X I is X I star plus some error be on maybe X I is the length of this table so I take out my thing and I measure and I round in the nearest inch well I don't have an exact measure right this is the trilling to the table I've got a little bit of an error in there I measured the table and that error is pretty random when I round like that actually is I think it's a uniform distribution in that case I think rounding is uniform distribution and so that's one case where you have the X that you have would have a random error associated with it so when you round the Neer's inch sometimes it's bigger sometimes it's smaller what you wrote down a piece of paper and no matter what degree of measure my good half inch quarter inch I'm going to have an error at some whelming always if this error small really really tiny relative the length of the table that's not going to matter much for most applications and so when we have a small probably randomness it's not going to affect this very much we'll still be okay but as that error gets bigger and bigger and bigger you can get severe problems using all of us and that's just one simple example of how to get a red max there are all kinds of other ways that your actions can end up near and when that happens you're destined a derp isn't necessarily yes all right the error term is zero mean this is not an important assumption for the most part it's easy to get over but we generally assumed that these X's are normally distributed around the true line so those are supposed to be normal distributions of these X's so I choose the I choose this x equals two I took 20 times I get different wise each time that ought to be a normal distribution and it ought to be centered on the truth and I'll be centered on the true line if it has zero mean so the errors have zero meaning on average this will be centered on the true line now sometimes that's not what happens you give you get nonzero errors are non Rama nonzero put my thoughts for the errors a nonzero mean for the errors so here's your true line but your distribution looks like like this they're sending up here instead of on the true value so this is a true line but your errors are non-random there's like they're random that there's a nonzero mean why can't I say nonzero mean errors have a nonzero mean and so your distributions that I just wrote down when you sent it out here with me and so if you ask them in line you're going to estimate that line instead of this line because this is where those errors are now centered now as long as the error say that the expected value of BI is for this distance before everywhere along the air is constant what's this going to mess up the slope is going to be okay but the constant will be biased so we have a nonzero error biases the cause now the error varies then you're not going to have the slope up the most the time is just a cause of error this happens so if you have a nonzero error mean either the errors it just shifts the line up or down by the amount of the mean most of the time in economics we're interested in the slope and not the constant if we're only interested in the slope this is not a big deal on a few times mission is a constant though then we're gonna have to worry about this so if you have a air for why won't you change the constant estimation in here regression you'd have if you knew it you would so if I know this is for I just asked them it's a crack board I'm all set but if I just know that there's probably a nonzero B mountain or its value then I can't I may know this design but not in magnitude then you can even bound things it's at least this day or at least this small but you can't really do much more than that but if there's some way to actually know this you can't get it out the explanation because the estimate so here's a line and it's not going to tell you whether they have a zero mean or not so you have to get that for operatory information and it's barely an air so this is only a problem if you care about the concept all right homoscedasticity what's canasta city mean parents this means same variance this is the assumption that the variance of your errors are constant here we have the zero meaning so we're saying that the UI are distributed with a zero mean in a constant variance the variance is there's no I here the variance is the same for every error when I wrote these down I tried to make these distributions the same sprint the variance is the same everywhere that's not always true if I'm measuring sales and I put Walmart irons in the same regression what do you think I was the bigger variance the variance of their sales is probably larger than the total the daily variance of Walmart's probably bigger than total sales of what stores in town so if I were doing a regression with those things in likely see this is the true line because I start off with a small spread and then the spread as the story gets bigger the variance is probably getting bigger too but whatever the reason if that occurs this variance tends to get larger or starts begging gets smaller or start small against big event gets small whatever as long as it's not constant you got a problem it's not going to be the best estimator here's why well s thinks that every one of these observations is equally informative but if you if someone wanted you to if someone said you can only use half of the data to estimate this line which happened you choose I choose that as the variance is way low these are way more informative about the true art of the needs so when I am estimating what I want to do I want to give these way more weight than I give these because these tell me a lot more about the truth that means to OLS gives them all the same weight so essentially what you do is you take the X I and you divide by the variance so if I've got X I here I divided by the variance if the variance is small it makes this more important the variance is large makes that less important so we're going to have to take the EPI estimator and somehow get this one over Sigma I involved with the weights right so all less weights all the observations equally when it shouldn't and that's the fundamental problem of the OLS estimator when you own arrows could ask us today the mean is fine it's not biased so it will give you the right betas the center points are still fine instead the variance is getting much larger as you move to the right a lot of their view you don't have a zero nonzero mean problem which is the variance changes so there's the central tendency is still correct you're still going to give on average the right line but you're going to have way more value to this in we have this in do you really want to focus on this on this lower end or wherever there was the other way around this handles it just fine and so our fix for it for heteroskedastic heteroscedasticity is essentially going to need to divide by the variance you divide the lives of the x's by the variance then you can show that the variance becomes a constant will prove that you end up waiting you eyes by Sigma and that then does the kick the variance of this its sickness never mind that'll fix them all right your next assumption is work no autocorrelation let's spend a lot of time on this this is really calm this heteroskedasticity probably is mainly a problem with time with cross-sectional data this is mainly a problem with time series dating data over time essentially in this case repairs all of a pad so it might be that UI so our model is again why I is beta 1 plus beta 2 X 2 I plus UI same model as before on correlation so we're going to say well you I is Rho UI minus 1 plus B 9 this is this is a random variable so it says air today roll might be 1/2 is 1/2 the air yesterday plus some new innovation and so your airs are persistent over time if you've got a high air today you're likely to have a high error tomorrow so when Rho is positive generally your errors tend to follow this way it's not this distinct of the data I've exaggerated the way so tendency high errors followed by high errors low errors followed by low errors if GDP is below its long-run trend today what do you expect it to be next month probably going to be below the trend again so there's persistence in the Jin GDP if this is the long-run trend we're above and trend today or let's do it right what below the trend today as we are more likely to do below the trend amaro there's some persistence we're not jumping all around it's not over long term today tomorrow we're above then we're that's not the way the economy works things tend to move smoothly to them they can move smooth in this way and so your errors tend to follow some sort of distribution here when that happens if you ask to make this model with those errors your first homework will give you an example of this you'll get T statistics that are huge absolutely huge it looked like you have the best fitting model ever you'll write home a mom gosh I've got that I got a T of 300 I'm going to be famous dammit correct for this it's insignificant you've got no relationship whatsoever this is the sales example I was talking about you often get this kind of persistence in these sales data and if someone was real impressed that they had a nice Club spinning line between advertising and sales put that up in a sales meeting you should read your hand and say you know I can give all the reasons later how you can save it it's not the right conclusion to draw from these data if you bet the firm on the fact that you got a significant relationship there boy I think you might be making a mistake and I'll ask that stupid economy then the verb fails to smile you're on but anyway understanding at least how to recognize the problems you do know know their technical side of it's going to be sometimes there can be more persistence than that that's called first-order autocorrelation you can also have second-order usually use time series you see you're going to row 1 UT minus 1 is row 2 UT minus 2 so this would be second-order autocorrelation the error today depends upon the error yesterday and the day before normally you and your roommate get along but not today you read this is a positive you're measuring how mad you are you're very mad day and this is how our stupid things your roommate did yesterday this is all the stupid things they did the day before and when you go back three days you're ok you got over it so you removed today has nothing to do with all the stupid things your roommate get three days ago but this might be point one so if they did it two days no you're still 0.1 I've said this about you point eight happen yesterday you're still really mad and this is all of your stupid things I do today which your roommates so erratic that they're pretty much random and so how long the memory is the persistence is determines how you model the autocorrelation you can see you know rainfall or whether it's been cold for a couple of weeks you're above average temperature you tend to stay there with your blow average temper you tend to stay there not forever you'll eventually move to some other point if there's a lot of persistence in the errors in the models and if you fail to account for that persistence you're going to make a big mistake the problem here is that all less things in every observations a brand new observation if it gives it new information so treats every observation is brand new information fully informative but if it's a today and then it's 79 Morrow the fact that seven high tomorrow doesn't add much to what you already knew from what going it's 80 and knowing this persistence so your observation tomorrow is not as informative as it would be in a model that doesn't have this persistence OLS gives it full weight and you have to tell all as no no no no no those aren't the right you shouldn't be given those the same weight because of the persistent this is not new information only part of the information is important that you already knew all that streets at all is new and so it makes mistakes so we're going to have to correct this model somehow what you do is you subtract off row times a model yesterday you just transform the data and you can fix it pretty easily but again if you have that problem oh that's just isn't network it'll work it's not going to give you the right right answers the next one is it's just harder to explain this one says this is true for all that's I use that symbol page 911 100 times so this says the exes and use are uncorrelated whatever that happens and it's going to happen what that's a very very common problem whatever that problem happens OLS is no longer the best estimator OLS is no longer balloon all this will be biased here in that case weight loss works here's what all this does takes a model why I chose beta 1 plus beta 2 X 2 I plus beta 3 X 3 I so there's a PEZ our model correctly specified is the way all s measures theta 2 and beta 3 the way it gets an estimate is it looks at the data is it finds x when X 2 moves the X 3 stays constant as long as X 2 rooms X 3 so this goes up by 4 this goes up by 8 it says Oh beta 2 is 2 this goes up by 5 5 this goes up by 11 it's a little more than 2 this goes up by 3 this goes up by fun little less than 2 so it goes through the data defines all the independent movement your Nexus and it just averages notes it says ok what's the average response to X 2 all else equal but suppose this is it true suppose that's not true that says when X goes up you goes up so this goes up by 3 this goes up by 6 because of that and this goes up by another 6 because when X goes up say it X and you are positively correlated whenever X goes up you goes up that's what that means so this goes up by 6 saying so now with what OLF sees is this one up by 3 this goes up by 12 is it all the cognitions for no the coefficients 2 because of that correlation it's getting absolutely the wrong answer and so when that assumption violated when X moves and you who's the Y movement fools it because it moves for two reasons and all s assumes and all for one when it sees wide loop it assumes that's true it as soon as this didn't move and it missed measures the coefficients when x is a random that's likely to happen your most basic law the quantity demanded is a plus B times the price plus some hair quantity supply in this model it turns out that this P I this a I are going to be related they're going to be correlated I tried to estimate this model one equation at a time how do you do to happen effect the same day that you see there's one problem we have to deal with later to is simultaneous equations these both have a cubit of PE these Q's are the same you only see one Q tomorrow but anyway in this model this VI is going to be a random variable and if it is then you've got trouble we'll come back to that later I should introduce them ok well it's five minutes or less the book doesn't back this one I want to put in there the number of observations and is greater than the number of variables if that's not true you can't even ask to make the model if you want to estimate four things you need at least four pieces of data and so that will leave it put either one more than what the last you next time number eight is that there must be variability in the essence and the more variability the benefit of estimating two lines in this one we've got a group of X's here and group of X's here right beside in this model we've got a group of X's here and a group of X's way out here same pattern but what do you think you'd be more confident in your estimator think of the limit think of you all your observations we think there's no variability in the exit also so you've got 100 observations but it's all the same X now try to fit a line to this what constant should you have like it looks like a teeter totter there's no way to know what the slope should be with that line that builds get the same say and the closer your observations are together the more uncertainty you're going to have about what the true line ought to be the further apart they are the better it looks and so the not only you you don't have any variability Rexes at all you can't estimate the line but we can say more than that more variability is Latin is better than less variability and in fact you saw them for the model Y I and beta 1 plus beta 2 X 2 I plus ey used a factor for 21 variance of am too at is Sigma squared over the son of the X I'm minus X bar square what's this a measure up in this model right here what's the mean of the XS X is 4 they're all 4 what's the mean for so it's X minus X bar then 0 what's the sum 0 0 what's the variance in that case infinite you have infinite variances you don't have any idea what the true thing is in that model the bigger the spread like here the burner apart of these are the smaller this variance is going to be okay I will finish on time in this class we've had some trouble today with people going in and out it I get emails and that happens especially a class like this you get up in the middle here and walking out you're disturbing everyone behind you in front of you and everything else we've got videos we can't stay here for an hour and 20 minutes I question why you're in college to begin with but stay home and watch the videos and let the people of Auburn
Info
Channel: Mark Thoma
Views: 366,452
Rating: undefined out of 5
Keywords: Economics, Video Lectures, Econometrics
Id: WK03XgoVsPM
Channel Id: undefined
Length: 78min 22sec (4702 seconds)
Published: Thu Jan 06 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.