 All right. Good morning. Let me just increase the volume a bit. So, you all know Professor Schweitzer is not here this week, which is kind of unfortunate because this lecture is about modeling, agent-based modeling. I'm going to introduce basically the last part of the lecture and modeling is Professor Schweitzer's specialty in a sense. So, he was going to be able to to give you a lot of insights about modeling, but he's on a conference in Berlin and last year I gave this very same lecture, so hopefully I wouldn't be much worse than him. I'm just bothered by this light. It's too light in the front. I wanted the opposite. I want this to be dark. Okay, that's what I wanted. I forgot my presenter, so I have to use this poker and I will also try to keep track of time. Right? You'll see here the the time I spent. All right. So what you guys did so far, oh, by the way, before we start, let me make a few announcements, you all know that the exercises have been rescheduled, right? Today from two to three. So hopefully more people would be able to come now. What you did so far, you were introduced to a few stylized facts, I think four so far, seven. So you've covered all of them. Yes, that makes sense. And the progression of the course is the following. First we see we have the data, you were introduced to what the data is or what the data are, then you were introduced to how to, yeah, how to analyze this data statistically, how to derive stylized facts from it, and now we come to the last part of the course, which is about trying to reproduce the patterns or the stylized facts that we saw. And this would be done by modeling, which is a topic of this lecture. So you saw so far the stylized facts about the size distribution, the growth rate, the entry and exit rates, and this is annoying me, and growth rates, distributions. Hopefully now, I mean, I'm pretty sure about you, but hopefully everyone taking this course has the technical skills required to analyze data and to do some basic statistical tests. And by basic, I mean just one, the Komogorov-Smirnov test, which is a one line in R. Maybe a peculiarity of the Komogorov-Smirnov test is that to run it, we need to to run the maximum likelihood before on our data, to get the best estimates for the hypothetical distribution that we suspect generated our data. And that may be considered the disadvantage of the test, because you use your data to run the test. In that sense, the Komogorov-Smirnov test is a bit conservative, but for the purposes of this course, it's more than sufficient. And today, as I said, we'll look at modeling. Those of you who took System Dynamics last semester, who took System Dynamics last semester, I know, yes, I remember you guys, okay, you too. So you know already what modeling is. The difference to the modeling you saw last semester will be made clearer as the lecture progresses. Okay. So I already asked you this question, those of you who are taking System Dynamics, who took System Dynamics, but for the others, and by the others, I mean the other three guys, what do you understand when someone tells you, well, let's do, let's model the system? What do you understand by that? I mean, also a question to everyone. If I tell you, well, let's model the firm size distribution, or let's model the economy. What do you understand by that? What do you expect to happen? Any intuition? To get something that is simple enough to see what is important. You're going in the right direction. It's it's the right thing, it's, yes, it's the right thing to to say that, yes. It's the right intuition. What you're talking about is the second types of models here. Which is you define for yourself what is important. That's an important thing. It's a subjective decision. You define as a modeler what is important. Someone else who is analyzing the same system may decide that something else is important. For you, in an economy, the important thing may be the inequality of income. For someone else, it may be the level of competitiveness, right? So the importance is a subjective thing. That's one thing. Second, as you said, to have the minimum set of ingredients which are required to produce a given behavior. And this goes into the bullet point. Include as much detail as necessary. Now, why do we do that? Why do we want to include just the ingredients that are required to produce a certain behavior? Well, if you include everything you know about the system, right, you try to model the economy, and you include everything you know about people's behavior, or investors' behavior, or governments' behavior, all this kind of stuff. You may be able to reproduce some known facts like business cycles, for instance. But are you able to tell exactly which parameter, which factor contributes, let's say, to the size of the business cycles? No, because you have all these different variables, and it's very difficult to disentangle their effects if you just include them from the start. It's similar to when people do linear regressions. You probably know linear regressions. What is the meaning, let's say, of we find this factor statistically significant with a coefficient of 0.5? What does it mean? The interpretation is holding everything else constant. Increasing this factor by a unit of one leads to 0.5 units increase in the dependent variable. The same thing here, we hold everything else constant, and we add one more thing, and we see what happens. So with these models, we start from the bare bones, from the minimum set of requirements, and often you basically start from a random thing. You assume that the phenomena you observe, your macroscopic behavior of the system is produced by a random force. This is the simplest thing you can assume. If that doesn't help, if that doesn't reproduce your behavior, then you add a little bit of complexity, a little bit of complexity, a little bit of complexity until you get the behavior. Only in this sense you're able to say, yes, it's a strong indication that, for instance, humans aversion to risk produces whatever economic outcome that you're interested in. This is supposed to the first type of models, which are equally valid and used in a sense, where you try to model quantitatively the whole system and use it to make predictions. For instance, weather forecasts. You try to include everything you can possibly imagine or you know about the weather. You put it in a computer, you let the equations run, and then you get the prediction for the weather tomorrow or next week. Probabilistic prediction, of course, but still kind of a prediction. You're not able to understand which atmospheric variable increases the likelihood of rain tomorrow, but you're able to say that it's going to rain with a probability of 50%, and that's what you care about. That's what people care about. A flight simulator, I believe, or it's not mentioned, a flight simulator is the same thing. It's the first type of model. You try to model the plane to the greatest detail possible, and then basically you put the pilot there and the pilot experiences everything that he or she will experience in the real plane. We're going to work with the second types of models. These are the models where we start with a simple, very simple structure. We try to complicate it further and further until we get a stylized fact that we want. Then we'll be able to say, well, this is why the stylized fact emerges. It's because of this variable. Actually, a good example of an agent-based model or this kind of minimalistic modeling is the prisoner's dilemma game. Does anybody know? I suppose everybody knows the prisoner's dilemma game. It is used to model a lot of real-world situations like negotiations or treaties, all kinds of worldwide interactions. If you look at the prisoner's dilemma, the assumption about what agents or what people can do is very simple. They can either agree to cooperate or disagree to cooperate. The insight that we get from this model, for instance, is that if we only have rational agents, you would never have cooperation. Another insight is that if we add incentives to these players, they may start to cooperate. These are the kind of things that we'll try to extract from the models in the rest of the course. You probably recognized this slide from last semester, complex systems. Let me just ask you, those of you who recognize it, what are complex systems? I mean, you nodded. What is your take on that? I will rephrase this in a more succinct way. The thing is, complex systems are systems which exhibit properties or behavior that you cannot deduce from studying the interactions, from studying the properties of the individual elements in isolation. For instance, this is not a nice example of a complex system, but if you think of water, water boils at, let's say, 100 degrees Celsius. But the individual water molecules do not boil. Only when you put them together, a lot of them, and they start interacting, do you get this emerging property boiling at 100 degrees Celsius? Water is not accepted as a real complex system because to have a complex system, you need to have very many individual elements interacting actively. So you can argue whether this is true for water, but another example for a complex system is your brain. You know how each neuron looks, I mean, people know how each neuron looks like, what kind of impulses it sends, how it is connected to other neurons. But if you study the neurons in isolation, you cannot predict the emergence of, for instance, conscience. This is an emerging property of the brain, which is a result of this many, many individual interactions. So we cannot predict the emerging properties of these systems just by focusing on the individual elements, because these properties are produced by the interaction of these elements, of the constituent elements. And this is exactly what this slide is trying to say. How do the individual elements, their properties, and their interactions, how do they produce the behavior of the whole system? In a sense, that arrow there is the micro, macro link. How do we link the interactions of the elements to the properties of the system? And that's what we're trying to understand. In the rest, and for this we used agent-based models. It's very appropriate because with agent-based models we can model the individual elements, we can model their interactions, then we simply let them interact and see what happens, whether we get the emerging behavior that we're interested in. So from now on, agent, just a basic terminology, agent would refer to particle or human or whatever the constituent elements in our system is. This is a nice slide which basically summarizes the point or the purpose of the two courses thought by the chair of system design, which is systems dynamics and collective dynamics of firms. It's basically how to influence complex systems. One way which you saw last semester is the top-down approach. I always like to give this analogy to macroeconomics. Macroeconomics is basically a top-down approach to model an economy. Why? Well, because you focus on the top level, on the macroscopic level, you try to define basically representative or average agents, and then you design boundary conditions for the whole system. We'll have nice slides showing you examples of this. The bottom-up approach is what I just said. We start from the very bottom, the individual elements. We simply model them and their interactions. We let them interact and we see what happens on top. In both approaches, we are interested in explaining the macroscopic properties of the system at hand. So both approaches have the same goal. This is the top-down approach. What I've shown you here is this is, in fact, taken from a macroeconomics textbook. What is shown here is a system where we have defined the macroscopic variable of interest. In that case, it's the GDP. If you'd like the emerging behavior that we try to explain, what influences the GDP? In our model, we define the most important elements on that level. This is the level of a country. We don't go to the level of, let's say, households or firms. We stay on top on the level of the country. On the level of the country, we have firms. Maybe in your notes, you can see the name of this model. You have firms, households and governments. It's very simple. You don't have trade with other countries. You don't have wars. You don't have sanctions, whatever. Everything else that we don't want to model is put into a black box here, and then there's some interaction with this black box. But our model is only concerned with these elements and their interaction. Or the so-called boundary conditions. For our country, we can define boundary conditions in terms of taxes. Kind of constraints, if you'd like. Taxes that firms pay to the government. Taxes that households pay to the government. You probably know by now that these taxes are a lot higher than these taxes in most capitalistic countries. You can define, let's say, the income that firms pay to households, consumption by households, and all this kind of stuff. And then, this is basically on the level of the country, your idea of what may influence the GDP. Now, let's go. This is starting from the top. But, of course, we can choose a different level. We don't have to be at the very top the whole time. We can go one step lower, and before we do that, this is an illustration of the whole idea of the top-down approach. We can always start from the top, be here at the level of the country, or we can see the top level consisting of multiple other sub-levels. And we can model each of these individually. We can even dig deeper and see each of these sub-levels being made up of other sub-sub-levels and model these. So there is no limit on which level we have to be stuck in. But let's go one level deeper. Now, we were at the country. We go one level deeper, and this is just the firm, the level of the firm. If you started this model a little bit more in more detail, you would immediately see that this is the famous Port of Five Forces. Right? It is a macroscopic model. Because the macro variables at this level that we are interested in are these things, the degree of competition, the barriers to entry, supply of power, and the threat of substitution. These may be the macro variables at the level of the firm that we are interested in, and we try to explain. And then we can see that the firm, or the environment of the firm, consists of, of course, competing firms, suppliers, buyers, substitutes, and new entrants. This is the Port of Five Forces. And then by modeling or by studying these boundary conditions here, so for instance, what is the initial capital requirements to enter this business? This is the new entrance here. By studying all these links, or modeling all these links, we can more or less get an educated guess on these global variables. We can, of course, go one level deeper, always, but we'll stop at this one. This is now inside the individual firm. And the macro variables that we are interested in here are the productivity of the firm, the, let's say, the turnover, the revenue, well, yes, sales and revenue are kind of the same, but let's say this is the profit, patent applications, whatever you may like. And for this particular model, we see the firm, the individual firm, consisting of management, employees, technology, production basically, different departments, different production units. And, I mean, of course, you're free to choose, you're free to choose the internal structure of the firm yourself. Outside, we leave, let's say, all the influences from the high levels. For instance, the government was at a high level. It was at the level of the country, so we leave it outside. And we simply do not concern ourselves with modeling this thing. It's a black box for us, which simply, let's say, gets 10% of our outcome every month, for instance. And so on with the others. So you see, the top-down approach can have actually multiple levels of analysis, depending on what's your agenda, in a sense. If you're a politician, you would probably stay at the level of the country. If you're a CEO, you would probably be here. If you're a scholar in the Harvard Business School, you would probably be here. So these are all valid approaches to take, and the insights or the macroscopic variables that you address with each level are different, of course. So there is no right level of analysis for the top-down approach. Yes. You're basically here. You're at the bottom, so you've effectively reached the bottom. And this is, yes, this isn't the other approach, yes. So you kind of anticipated what I was going to say. But with the bottom-up approach, we go to the, let's say, to the bottom-est conceivable level of our system. For an economy or a country, this could be individual firms. Of course, now you may argue, well, there is a lower level than that. There is the level of the individual. You can, of course, go there as well. But then the link between the individuals and the firms becomes more difficult. Because, you remember, we're still interested in collective outcomes. We're interested at the macroscopic variable, GDP, or in this case, it's the stylized facts that we see. For instance, the first stylized fact, firm-size distribution is skewed. So you still have to start from the bottom and kind of emerge to the top. So with the bottom-up approach, we begin with postulating what is the constituent element at the bottom. This is, you may regard it as an assumption of the model. In our case, in the rest of this course, yes, all the models that we're going to see assume that the lowest level of analysis is the firm. So we're not concerned with what happens inside the firm. We just take the firm as an unbreakable subatomic particle, for instance. The firms have a size. This is a property of the agents. So we just say the firms can only have size, nothing else. You see how the modeling approach is somehow linked to what you're trying to explain. We'll be trying to explain stylized facts. And stylized facts are mainly concerned with size distribution, growth rate distribution, what else, entry-exit rates. So it kind of makes sense to choose the size as a property of the firm. Another property of the firm may be level of indebtness, for instance. But that wouldn't immediately contribute to the firm size distribution that you want to model. Anyway, and now we're interested into how the size, this property of the agent, how this property evolves over time. So we're interested in the dynamics of the size. This is the DXIDT. The dynamics is basically influenced by a force F. And by assuming different forms of dysfunction F, we can in effect model the different ways that the size of a firm can change. You can imagine for instance that if we want firms to interact, so individual elements to interact, we can say that F, this force F, is somehow related to what the others are doing. How the others are growing or declining. In this lecture there would be no interaction. Remember I told you complex systems, many elements interact with each other and produce an outcome that we cannot predict without analyzing the interactions. But here we start simple, we will disregard interactions for the time being. In the coming lectures you will have interactions as well. So, yes, this is the schedule interaction of companies to come. Now let's start, I told you, we start the model with the simplest structure conceivable. So let me ask you this question. If we want to model the change of firm size over time by a force F, what would be the simplest assumption we can make about this force F? What could it be? I mean it can't be zero of course, if you assume zero then it's a pretty static and boring world. But what is the simplest thing you can assume for F? This will also be kind of boring because you would only have firms growing forever. We want to reproduce the first stylized fact, actually the first two stylized facts. Firm size distribution is skewed and the growth rates are Laplacian. So we want to model this force F in the simplest way possible. But we want to assume a form for F, what could it be? I mean I'm pretty sure you all know it, you just do not think so simple. Come again? Linear, linear with what? Yeah but then you basically have this regime where you have exponential growth forever over time. Of course we can do this, you immediately do this, you assume a constant or linear shape, you solve the equation and you get the X is exponential. Yeah but now imagine you have 100 firms, they all grow like this. It won't be skewed. That's a good question. Maybe I should have said this. Another reason why we like to have very simple model is because we can make some analytical analysis about the distribution of firm sizes for instance. You don't have to let them interact, I mean there's no interaction here of course. But even if you had interactions, for instance let's say the firm size depended on the average size in the industry. Like the average size is computed from all the other sizes of course. So in a sense you have an interaction with the average size. If you assume that you can still do analytical analysis and answer what is the distribution of firm sizes going to be. Those of you familiar with statistical physics, I mean this is basically what they do in statistical physics. They have many particles and they're not so interested in calculating or simulating the individual interactions. They're interested of course in deriving some probabilistic predictions about the macroscopic properties of the system. Macroscopic property in our case is firm size distribution. We're not interested in what is the size of one individual firm going to be. We want to know how all the firm sizes are going to be distributed over time. If you're interested in this we can answer that question analytically without any complicated coupling of differential equations or something like that. But in other cases of course when your interactions become more complex you cannot do this analytical analysis. You really have to put it in the computer and then see what happens. But in this lecture we'll keep it simple. I think for the rest of the course we'll keep it that simple. So yeah what is this force? Well it's the random force, right? You can always assume the most, yes you may say unrealistic case, but also the simplest case which is the firm size changes randomly. From one point to another. And I've tried to illustrate here what random actually means. Because it's important to keep this in mind. Random doesn't mean that you just can't predict it. What random means is the following. So let me just first explain the graph and then you immediately understand what all this mathematical stuff means. If this is the force, the random force and this is time. If we focus on one firm let's say, yeah whatever, one firm. Let's assume that this is the force, the solid line. This is the random force that is acting over our firm over time basically. On firm J basically. So this is the random force acting on firm J over time. Random in our definition means that the force acting on our firm J at this time and at this time are independent or uncorrelated. So the force acting on our firm J at this time does not depend on what happened to the firm in the previous time step. This is uncorrelated random noise. Otherwise if, let's say you were shocked at that point of time very strongly. If this was not uncorrelated then you may say well the probability that you are shocked with the same amount tomorrow should decrease. Because you cannot have too huge shocks in two subsequent days. But of course if these are not correlated that's possible. There is a famous fallacy in probability theory where most people think that if you toss a coin and you've had five consecutive heads. The probability that when you toss it again the sixth time it won't be a head should be a lot smaller than half. Because you've already had five so it's very unlikely that you will have the next one to be a head again. But of course each toss is independent from the previous one. So even if by just sheer luck you've had five heads the sixth one is just as likely to be a head as it was before. So it's the same thing here. This means that the force is uncorrelated over time. But now if you look at two different firms, firm I and firm J and you fix this time period here. The force acting on firm J at this time and the force acting on firm I at this time should not be correlated. So this is uncorrelatedness across space as well. So this is our definition of random and fancy way to put this graph into an equation is basically this. The expected value of the force is zero for each firm and the firm is basically the expected value. This means that the force is uncorrelated over J and over T. So it will be if I is different from J and T is different from T prime this thing would be zero so there would be no correlation. But yeah I mean these are mathematical details you don't need to be so concerned about it. And our equation now becomes like this. The firm size in the next time period is simply the firm size in the previous time period plus this random force. S is the strength of the shock by the way. So can growth be really random walk of basically change a firm size means growth. So imagine that were the case what would be the implications of the world we live in. If firm sizes or if growth of firms is random then what's the point in all these deep technical analysis that people do. But of course it's not random walk. However this is the the way we start the model and it's an illustrative example even though it's wrong. It's an illustrative example to show you how we model. We start with a simple thing. We hope that it's wrong because if it's not wrong it means that you need to simplify it more. If this was not wrong you either need to simplify it more or you need to kind of explain how is it possible that firm size that firms growth randomly. I mean nobody would would believe that. Yet if you look at let's say this I think this is a German index yes this is the ducks. If you look at it this is obviously an old chart from 2002 but I can't imagine that it looks much different now. I think this over time. Yeah this is over one day actually. I mean it kind of looks random. Remember the index is always an aggregation of a lot of stuff. But if you just look at the index it looks random. And Louis Bachelier he's a very famous mathematician who kind of developed the mathematics of Brownian motion a couple of years before Einstein in fact. So Einstein was not aware of his work when he developed the Brownian motion himself. But in fact he did it in his PhD thesis and it didn't become it didn't become popular because he was a mathematician. He was trying to get a PhD in mathematics but his thesis was about modeling the stock market the French stock market. And the mathematicians obviously they thought this is not rigorous enough it's not mathematical enough so his thesis didn't get too much attention. In fact if I remember correctly his PhD advisor thought it's a good work but it was a pity that he didn't explore more the equation. So let's say one of the implications of the Brownian motion. I forgot what but they were completely missing the relevance of his work on Brownian motion. So there were no pollen particles and stuff like that. So what he did he looked at the French stock at the French index which looked a lot like this and it looked random. So let's see if doing that I mean he couldn't know it by that time so he just wrote the thesis where he said these are the equations it's a random process. And that's what happens but now we have what to compare these predictions against we have stylized facts we know the firm size distribution and we know the growth rate distribution. So we can predict from this model what firm size distributions we should expect and compare to what we know. So what should we expect from a random walk model. Well this is how the company size grows over time. X was the company size remember we just add a random random number B. And B comes from a normal distribution with whatever mean and variance it doesn't matter actually. And I think for the simulations that you're going to see in the next slide yes we assume zero mean and some variance 10. It's a big variance. But of course it doesn't matter. Now I yeah so we have 1000 companies. I think now we have 10 companies I think and each one starts with the size of 1000 for instance. We let the simulation run 500 time steps you can easily do it in our. And before we get to the distribution or to the stylized fact that this produced from this model. This is how the firm sizes develop over time for these 10 companies. So you see they all start with 1000 and over time some companies grow some companies decline. This is just a random force. And since we have such a high deviation you can see that this spread here is quite high. What you can also see here is that some companies once just by luck they grow for instance the red one there. It becomes more and more difficult to reverse the growth just by random force which makes sense because the random force you need to go from the red point here. From the red point here to let's say here is huge. So depending on your random shock depending on the variance of your random number this may actually happen very very rarely. I think it's a good time to stop because then we'll be looking at the firm size distribution produced from this model. And you'll see how it doesn't match what we need. So yeah let's stop for 10 minutes here. So now I finally have my handout. Right so this was Bacheliers random model. These are how the firm sizes develop over time. Of course I will not show you analytically how the firm size distribution can be computed to look like but it's possible from such a simple model. Let's just jump directly to the distribution of firm sizes and distribution of firm growth rates. Well the firm sizes are distributed normally as you would expect. Right let's go back to the previous slide. How can we extract the firm size distributions from here at a given time. Right let's say we fix the time 200. What is this firm size distribution at time 200. Well we simply take all these values this value this value that value boom boom boom and then we plot their distribution. So that's the firm size distribution. And of course it's normal because it's in effect it's a sum of random variables which needs to be normal by the central limit theorem. So firm size distribution is normal and I believe different colors right different colors represent the different times at which the firm sizes the firm size distribution was taken. So the red one is in the beginning right in the beginning we have all the firms more or less centered around centered around 1000. And then as time goes on and on. Oh sorry. The firm size distribution becomes more spread out. Of course. So that right there doesn't conform to what we know for the firm size distributions which should be skewed. The growth rates also don't look okay. They are normally distributed because this is the growth rate right. Yes it's basically this value here that that will not be yes that is not the rate that is growth difference in the sense you can take the percentage change in fact. I think in the notes yes in the notes of this slide it is it is mentioned that you can approximate this log growth rate by the percentage change. But regardless it is always normally distributed because you always have normal variables. Normally distributed variables so this is also not okay. Well yeah you can also mean that you can also notice that the growth rate is independent does not depend on time right so over time the distribution is still the same. But that doesn't help a lot the model is anyway wrong. Let me make a quick digression assume assume for the moment that this this is true that the firm sizes were normally distributed in real life. And then that this was able to reproduce the firm sizes. It's a strong assumption but you'll see why it's relevant in a few slides. So what have we done so far we came up with a process namely the random model which reproduces a stylized fact like this one on the left. All right now let's use our model to make some predictions. Okay about the firm size distribution because what we have remember we have the data for the firm size distributions but it's a snapshot it's a snapshot at this year. We can use our model now to make predictions for how the firm size distribution is going to develop over time. I mean you can probably see how it develops over time. But I tried to show you here a fancier picture for how the firm size distribution would develop over time. You don't need to understand this equation it's not relevant for the exam just out of pure curiosity who is empty. And the other guys. Okay you're a physics so this is a master equation. Basically the the idea is the following this is our firm size distribution probability of finding a firm of size x at time t. Okay this is how you can think of the firm size distribution and it looks like this over time. In the beginning we have the normal distribution with time not only does it become more spread out as you saw in the previous slide but the mean also shifts to the right. Now of course this shift depends on the parameters of our random noise it may shift to the left it may actually not shift at all. But the point is that it becomes more spread out more spread out. So if in reality our firm sizes were distributed from the random model this is what we would expect for the firm size distribution eventually to flatten out. So all the firms effectively would have you can say size of zero because the probability of finding a firm of a given size at time t would be zero. So it's strange things happen in mathematics when you go to infinity so don't concern yourselves too much with this. But the important thing to remember is that if that were the case if that was a stylized fact we would expect as time goes by and by firms to become more and more different. To have very very small firms and incredibly huge firms which is not the case. Just for completeness I can tell you what this equation means how to read it. Of course you don't need to remember it but as Professor Sorenette says in his lectures when he talks about random normalization group theory or stuff like that. Just listen to the music so that that should should be enjoyable enough. So we are we're interested in the probability of finding a firm of a given size X at this point of time. Right let's say we're interested in finding a firm size of size 10 at time two. What would it be equal to well it will be equal to the probability of finding a firm size a firm of size one at time one. Times the probability that this firm grew from one to ten in this time period. Plus the probability that we find the firm size of a firm of size two at time one times the probability that this firm grew to size 10 in this time period. And this is exactly what it means. Integral is basically a sum. The probability of finding a firm of size X at time t plus one is equal to the probability of finding a firm of some size whatever size. In the previous time period times the probability that this firm grew from that size to our size X in this time difference. And then of course we sum up over all these possible sizes that can exist in time period t. So this is the basic idea of a master equation. Again don't concern yourselves too much with it. The point of this slide was just to show you that what what would happen if really firm sizes were distributed according to the random model. We can make predictions from the random model and one prediction we make is that the firms would become more and more diverse over time. Just another proof why the random model is not true. This is now real stock market data. On the left side you see the returns I think of yes American companies in a time frame of five minutes. So this is a very kind of high frequency data. Well yeah maybe not high frequency but it's relatively high frequency data. So on the left you see the complementary cumulative distribution function or tail cumulative distribution function. Physicists always don't make this difference. They're more interested in the tail cumulative distribution function because they want to answer the question what is the probability that they find an effect of size larger than whatever. This is an interesting case the extreme events. You're not so much interested in what is the probability of finding something smaller. So they somehow they have lost this difference between cumulative distribution function and complementary distribution function. So if you read a physics paper on the Y axis you just have cumulative distribution function and they just accept it as a normal way to plot. But in fact this is a complementary cumulative. So what you see is log log plot returns of some stocks. I mean returns this is a proxy for the growth rate right how much a stock grows. It's a return and they have found that the complementary CDF of the returns for five I mean intervals five minutes is power law. It's a log log scale straight line it's a power law. And you know that the complement if the CDF or the tail CDF of a power law let's say you know that the density of the power law also is a power law as the CDF. So if you look at the density now this is linear now. Right this is linear and this is the density. It declines like a power law. These are the positive the positive returns which are the red dots here and these are the negative returns. So they both are power laws with and they found the exponent three. It doesn't matter what the exponent is but they found the exponent is three. And this is just another proof that the random walk doesn't work because the growth rates are normally distributed in the random walk. But you may also notice that this is not what you would expect from the stylized fact that you know which is that the growth rates are Laplacian and not power laws. But this is real data. How could it be the answer is that this is very high well high frequency data. So it's five minutes five minute intervals. We have one year growth rates so the growth rate from one year to another year and across a large amount of databases yearly growth rate growth rates are Laplacian. So a more correct statement of the stylized fact to would be yearly growth rates are Laplacian. Things like this happen when you work with data if you take data on the level of minutes or seconds and you start aggregating. Days months years decades eventually you would get a normal distribution right by the central limit theorem doesn't matter what the underlying distribution is. So one has to be careful when aggregating data because if you aggregate too much you lose basically the underlying mechanism which generates your data. And instead you see the effects of the aggregation what are the effects of the aggregation. Well imagine you have power law you aggregate power loss over time with what is a peculiarity of the power law you have extreme events. Well if you aggregate enough for every extreme event in the positive direction you would find an extreme event in the negative direction. So they would balance each other out and then you're left with a with a normal distribution. So you have to be careful when aggregating. We worked with yearly growth rates in the Laplacian these guys found that more fine grain data is power law distributed. But this is just for for additional information. The point of this slide is the random walk doesn't work. The next model that we're going to present the final model for this lecture is a model which actually works halfway. It's it's it was proposed by Gibral is another French mathematician and it was known it is now known as the law of proportionate growth. So even though it's only halfway correct it is still very widely used to model growth in general economic growth as well. So let me introduce it to you. Gibral was very very interested in skewed distributions. He was amazed that we don't find normal distributions as much as we would expect but we find skewed distributions in life and in a lot of areas in life. And one area that he was interested in fortunately was firm size distributions. How are firm sizes distributed. He proposed the basic idea that the the size of the firm tomorrow depends on the size of the firm today. Right. So it's not a random force anymore but it's a proportionate growth proportionate meaning that your size tomorrow is proportionate to what it was today. And this is captured by saying that the force the force acting on my growth depends on my size. Right. And in the simplest case he assumed that it's simply my size multiplied by a random number. Right. So instead of adding a random number we multiply by a random number. What you get is this. Right. This is a continuous version. If you discretize it you get the firm size in the next time period is simply the firm size in that time period in the previous time period times this. This is a random number. Again no interactions between firms. Right. There is no other index than I here. This is important. Okay. Let's see what we would expect from the from the from from Gibras model of a portion of growth. Well this is the equation. This is the equation. If you know well of course we assume when it's not of course but let's assume that delta T is one. So the time interval is one which you can do if if you if you if you duration of analysis is very long. So we can just rewrite this. The firm size at any time is simply the the size in the beginning times this product. Right. This this is very easy to derive. In fact there is a yes there is a type of here. So this should be zero one and so on. Right. Because what is this? Just this with zero not with one with zero. Well it's the firm size in period one. Right. This is X one. This is X two and so on. All right. So this is fine. This is T. This is fine. This is fine but there should be zero one to T. All right. Now we define the growth ratios in this way. This is basically the the yes it's really the ratio. So I mean you can easily see what happens if you divide this whole thing by by X of T. X of T would be everything except the last term. So you just get the last term. The growth ratio is simply this. It's normally distributed as you can imagine because this is a normally distributed random variable. Again the growth rates the growth rates remember defined as the logarithm of the growth ratio. Well you just take the the logarithm of this. It becomes the logarithm of difference. And it is again basically I mean it's the logarithm of this. Okay. Which is again normally distributed. Yes I mean yeah it's the log yeah. It's a log normal log normally distributed. If we yeah if we make right so if we make this approximation which is true only if B is small if the random shock is small. Right you can say that the logarithm of 1 plus B more or less equals B. I mean follows either graphically if you plot this and this or if you do the Taylor expansion of this. This is the first term of the Taylor expansion. Then we can define the these the lock of the size. Right we're interested in the firm size distribution first of all. The lock of the size is basically the log of this whole thing. This whole thing here. So it's log of X zero in the beginning times the lock of this thing. This is lock of a product which can be rewritten as the sum of the individual locks. This is property of the logarithm. Let me write it down. Right if you have logarithm of A times B that's basically ln of A plus ln of B. Right this property of the lock so if you have logarithm of a product. Basically the product is 1 plus let's say it's the sum of 1 plus Bi. Okay this is sorry it's the product it's not the sum it's the product. Right we take the log of this it's simply log of the product. I goes from zero to T. Then we can easily rewrite that we can easily rewrite that as the sum. All from I goes from zero to T of the individual locks. All right but we know what the individual locks are. We know what they are. The individual locks are these. Right so the whole thing actually becomes the sum of this which is the lock growth rate. And you can find exactly this thing on the slides. Where is it? Yes there it is. This is the second term and by using this approximation so ln of our growth rates. Or the growth rates are equal to this. But then we use the approximation of the ln of 1 plus B can be approximated as B. So we just put here instead of that thing we put a B of T. This is our random force. So you see the logarithm of the firm size this is any individual firm. The logarithm is a constant plus normally distributed thing. This is a sum of random variables. In fact it doesn't matter that this is normal. If you sum a lot of them you still get a normal distribution. Therefore the lock of our firm size is normally distributed which means that the firm sizes are log normal. Which is a good thing because it's a skewed distribution. So we are halfway correct with this model so far. Firm sizes will be log normal. A quick digression to illustrate the difference between additive and multi-platicative stochastic processes. Because in the random walk we were adding a random number. And here we are multiplying by a random number this term. One basic fact is that when you have multi-platicative processes the results are distributed as skewed basically. It's a famous example with the tossing two dice. In one case you toss two dice and you simply sum up the result and you see what the distribution of the sum is. In the other case you multiply the two dice and you see what the distribution of the product is. So if you do this in R in fact this is done in R and that's the code. The distribution of the sum is normally distributed but the distribution of the product is skewed. So yeah this is why we get a skewed distribution in the first place. But let's go back to Gibra. What did we find so far? The firm sizes... Yeah so we found an analytical result that the firm sizes should be log normally distributed. Well let's simulate it. This is the setup for the simulation. B is a normal random variable and just having in mind that B has a very very small deviation. It doesn't matter what the deviation of course is. But in our example it's very small because when you multiply if the deviation is too high you would immediately get the firm size to spread out too fast. So you won't be able to see anything. Okay again 1,000 companies 500 iterations and then each company has size of 1,000 in the beginning. And this is what we get for the firm size distribution for the growth rates distribution. Now this is a little bit of a misleading plot because this here is a log scale. This was plotted on a log scale. So something that looks like a normal distribution on a log scale is in fact log normal on the linear scale. However the sizes reported are the linear sizes. So keep that in mind. The scale is log normal but the labels are the linear sizes. But never mind you see that the log of the firm size distribution looks normal. So firm size is log normal but and it's a skewed distribution so that's good. But the growth rates are normally distributed and this is not a good thing. That's why the model is only halfway correct. Let me see how much time I have. 20 minutes I think that's enough. So the Gibral model, the law of proportional growth is able to reproduce the firm sizes but not the growth rates. Does it mean that we should discard it? What do you think? Yes that's one possibility. But let's say we don't want to change it. We just want to take it as it is. How can we use it? Can we use it at all? Just intuitively what do you think? One may argue that well it is able to reproduce the firm size distribution so why not just use it to model the firm size distributions and not the growth rates? What do you mean we're not interested in time dependence? Yes, you're right. But that's still, you can argue both ways. There is no convincing argument that a model which is not able to reproduce everything can nevertheless be used for the areas that it is able to reproduce. It's like any scientific theory. It has a domain where it can be applied but people are constantly looking for other theories which are able to unify all domains because otherwise you're left with just applying gravity here and quantum mechanics here and one is wrong applied in a different context. So it's the same thing here. We can argue that let's use the law of proportional growth to have a good guess how firm sizes develop but when it comes to dynamics the growth rates we cannot use that model. Now what would be the implication if we did that? If we assume that this is indeed how firm sizes develops. It is just the firm size in the previous time period times a random number. The same plot as before we're interested in what happens to the firm size distribution. Probability of finding a firm of size x at time t. It can be calculated analytically from the master equation it looks like this and it is a time dependent log normal distribution. If we disregard time it would be just a log normal distribution we saw that but if we add time time enters into the whole process in this way. This is how the distribution would look like over time. So here we have time and this is the size. Again the same message in the beginning it's log normal and then with time it becomes more and more spread out. So now you can argue well the Gibral model looks okay for firm size distributions so if indeed this is the process which generates the firm sizes multiplying by random number we should expect the firm size distribution to flatten out. What does that mean? We should expect growing inequality. So very large firms and very small firms. So you can even use this argument to say that the growing inequality that we've been observing in countries. Oh I think this is why it happens when I touch this. The growing inequality that we've been observing in countries is not a result of some conspiracy or conspiracy by the rich but it is just what happens naturally from the process that generates the richness in a sense or the wealth. Now this is of course more of a philosophical issue than something to think about whether the underlying processes that generate basically what we see around us what repercussions they have over time. What would that imply for the state of our lives. Don't take the message that growing inequality is something we should expect but this is what you can do with a model when you have one. Make predictions like these. Okay so this was Gibral's model. Right so these are the predictions. Exactly so the variance of firm size distribution increases over time. In fact it increases linearly and I believe in the notes you have a simulation in R. Yes which shows you how the variance increases. I mean the variance increasing meaning growing inequality. In fact in one of the self studies where you have to work with Lorentz curves did you already cover this in the lecture. Lorentz curves. Genic coefficient stuff like that. No okay so you will in one of the self studies you will have to plot the Lorentz curve which basically shows you the inequality in a given data set for the log normal distribution and then you would see that over time the inequality grows just from the properties of the process itself. As we saw the firm growth is wrong. From growth is normally distributed so yes as you said growth ratio is log normally distributed. So we can forget about the firm growth from the Gibral model. Now in the rest of the lecture and this should be enjoyable to you because it's completely relevant for the exam in the next 10 minutes. I would like to, is it 10 minutes? Yes 12 minutes. I would like to show you how Gibral validated his model because he didn't have these computers available it was 1922 I believe. So he didn't have computers available he actually didn't even have the Komogorov Smirnov test. It was not developed yet. So here was a guy who proposed the process to generate the firm sizes but how do you test whether your predictions match the data. We know how to do it now right we generate data from the model. We have our empirical data and we do the two sample Komogorov Smirnov test for instance to see whether the both datasets were generated from the same distribution or you simply test your empirical data whether it was generated from a log normal distribution but he couldn't do that. He didn't have all these tools available and he devised a very ingenious way to do it. It's a very neat way it uses amazingly simple mathematics and it is very powerful and it doesn't rely on this obsession with p-values that people nowadays have. People are obsessed with p-values and statistical significance and he was just reasoning from a logical point of view. So let's get on with it. What he did have available at that time were the so called tables tabulated values for very few random variables. In fact I believe it's just one and that's the normal distribution with mean zero and standard deviation one over square root of two. So he had this table available for the tail CDF of a random variable distributed like that. In the notes I've shown you how to read this table. A quick reminder or introduction is this is the argument to the tail CDF. This gives you the probability, yes it's the probability times 10,000. So this is not probability of 20, it's probability of 20 divided by 10,000. So it's 2 times 10 to the minus 3. Why they do this I suppose it's to save space because if you have to write 0.0002 then it would be longer. So this gives you the probability divided by 10,000 that your random variable is going to be greater than 2.035. This is how you read the tables. This gives you the probability divided by 10,000 that your random variable is going to be larger than 2.11, 2.15 and so on. So this is what he had available. How do you go about verifying your model now? Well, in the following way. He assumed that the form sizes are distributed according to log normal distribution and you all know that the density of the log normal distribution is this. This is a slightly more generalized version of what you can find in Wikipedia for instance in the sense that we've included a minimum size. In the most famous or most popular versions you don't have this term. But here we have it because we want to include the fact that there is a minimum size of each firm which is x0. I think it's 1. It makes sense to be 1. A firm of less than 1 employees for instance doesn't make sense. Alright. So this is a sketch of the proof. How we go about this is the following. We take a log normally distributed random variable. This is step one. We have no data at the moment. At step one we take a log normally distributed random variable. Theoretically log normally distributed. We find a way to transform it to this. And I mean of course this way is simply taking the log. If you take the log of a log normally distributed random variable you get normal distribution immediately. You just have to play a bit with the standard deviation but that's easy I'll show you. So we find a way to transform this log normally distributed variable to that. We remember this way. And then we transform our data in the same way. If we transform our data in that way and we still get this. Well that means that our data is log normally distributed. Right? Isn't that extremely simple? You just know how to transform a log normal variable to get this. You transform your data according to this way. Do you get that? Yes. That's good. My model is fine. No. Then the variable is not log normal. Let's do step one. I've spent one slide on this but it's this simple transformation of variables. What happens is the following. This is our original variable X which is theoretically log normally distributed. This is the minimum size X0. Fine. We just take the log and you know if you take the log of a log normal distribution you get X prime is a new variable. So two more minutes. Which is distributed according to this distribution. To a normal distribution with mean mu and variance sigma and mu and sigma are these ones. Okay these ones. They are the mu and sigma of your original variable. Well that's almost fine but we needed this. Right? We don't need this, we need this. Very simple way. You subtract the mean and you divide by square root of two of sigma. And you get a normal distribution, zero mean standard deviation one over square root of two. This is simply normalizing your variable. This is the way to transform it. Now what is the conclusion? Well the conclusion is that the tail CDF of this new variable evaluated at this point equals the tail CDF of your original log normal variable evaluated at X at whatever point. Alright. We'll use this conclusion and this is the last slide. Now we do the second step which is transforming our firm size. How we do it? Well in fact we don't even need to do it because we know the following. If X is a log normally distributed random variable, this one, if we calculate this value, remember we can calculate this value because we have this. We have this function from the table, from the tables. So we want to calculate whether X is larger than some value Z for instance or B. X is larger than B. How do we do it? We simply calculate, look at the table with the argument ln ln of B minus X0 divided by this minus this. And we get the answer. So what we can do now is, let's use this. We look at our data, we have our data and we ask what is the probability of a firm having size larger than something? We can calculate it from the data. This is the empirical tail CDF. If that probability equals the one we get from the tables, it's good. That means that our data is log normal and this is what Gibrat did. This is the last slide. This is his data. He had companies of size 1, 2, 3, 4 and so on. This is their frequency. He had this many companies of size 1 employees by the way. This is the proxy firm size and so on. This is almost the same as that. It is basically the same. We've just adjusted here this thing. Now this is the empirical tail CDF. The probability of a company having more than one employee is this. More than 2, more than 3, more than 4, and so on. This is, if we transform our X according to this, we transform our X according to this. We take 1 over this divided by ln of X and X is now this minus this. We would get that thing. If we look in the table and we ask what is the probability that our random variable n01 over square root of 2 is larger than that value, we get this from the table. You see, what we get from the table quite nicely matches what we can simply calculate by transforming the random variable in the way that I showed you. He plotted this is the calculated Z and this is the one from the table and he sees a nice straight line for two years. Yes, these are two years, nice straight line and that's how he made his verification. Yes, so as I said, this is not relevant for the exam. It's just a neat thing to keep in mind that people did that before having statistical tests and they were just fine. There were no scientific mistakes done. Alright, thank you very much. I'll see you today too.