Modeling systems

William T. Powers (2009)


We hear quite a lot about models such as weather models which can be used to predict what will happen in the next few days, or models of colliding galaxies which show what happens to all the stars as they are deflected by the gravitation of all the other stars, or models of nuclear explosions, or jet engines, or new airplane wings or whole airplanes. I doubt, however, that many people outside of meteorology or engineering and physical sciences really know what a model is — what models of the kind meant here can do and what they can’t do. In fact many people wonder why, when we have an object or a phenomenon right in front of us, and piles of data about its performance, we need to model it at all. What can the model tell us that past experience and observing the real thing can’t tell us? The following is a brief introduction to this subject.


When we look at the behavior of a real system like an economic system, we can see what it does but we can’t see how it works. The point of modeling, in that case, is to figure out how it works. Again, the question asked by a newcomer would be, “What do you mean, you can’t see how it works? Aren’t you looking right at it?”


“How it works” involves more than just seeing how one part of a system is affected by other parts. Yes, we can see how the parts are connected together — how the behavior of component C is affected by the behavior of components A and B. We can’t necessarily see all the components, but usually we can see enough of them if the system is simple. But we still can’t see how the system works.
Here’s an example of a system, represented by mathematical statements as engineers and scientists often do. This is programming language, not algebra:


A := A + 0.2B; { replace the value of A by A + 0.2 x B)

B := B – 0.2A {replace the value of B by B – 0.2 x A}


These equations describe how the system made of variables A and B works. Every time there is an interaction, the measure of component B is divided by 5 and added to the measure of A, and then the value of A is divided by 5 and subtracted from the value of B. This transaction just keeps happening over and over. What will this system do? If you start out and A and B both equal to zero, it won’t do anything: A and B will both just keep on being zero.


But suppose we set the beginning value of A to 100, with B still starting at zero. If we then plot the values of A and B for 32 successive calculations of both equations, we get this:

The left-hand column of numbers represents successive values of A; the right hand column gives B. This is the observed behavior of the system. To the left A is plotted in red, B in green. A varies according to a cosine wave, and B according to a sine wave.


When we model this system, we might start with the observed behavior of the variables as shown in the figure above. The object of the modeling would then be to figure out what sorts of relationships would have to hold between A and B in order for the observed behavior to occur. There are many possibilities, and one of them is the set of two equations above.


But another way to model is to do it just as we did here. We take the real system apart and look at how A affects B and how B affects A and write as many equations as needed to describe all the observed and preferably measured relationships. We begin, in other words, by analyzing the system to see how it works, and we’re trying to figure out what it does. Then we “run the model” — we calculate the values of A and B that the equations say will exist after every iteration of the program, and we get the plot and the table of values in the figure above. Then we start the real system out with A and B set to the same initial values we used in the model, and record how it behaves. And finally, we compare the result of running the model with the result of doing a run with the real system, and see how well the numbers match up. If we have correctly measured the two relationships between A and B, and have not left out any variables or added any unnecessary ones, the model’s behavior will match that of the real system very accurately. In fact, that accuracy is what tells us we have noticed the right components in the real system and represented them correctly in the model.


The reason we need the model is evident in the two equations above. Simply measuring the relationships between A and B is not sufficient to give any human brain a hint as to what a system organized that way actually will do (unless, of course, you’ve seen the equations before and have been told what will happen). I trust that the sine and cosine waves were a surprise.


I said “When we look at the behavior of a real system like an economic system, we can see what it does but we can’t see how it works.” It is also true that if we are shown just the equations that describe how it works, it is not very likely that we will immediately figure out what it does. If the system is complex with many variables and relationships among them, it is safe to say that no human brain could figure out what such a system would do — except by going through this modeling process.


When we look at a complex system, it is not immediately self-evident which aspects of it are important to its operation and which are just side-effects, perhaps interesting but not relevant to the operation of the system. We can see a lot of variables and a lot of relationships among them, but we don’t know which of them to include in the model. We don’t know, either, if we are seeing all the variables that matter, and at times we can see the variables but not how they are related. This is where the art of modeling becomes important.


The only way to proceed is by making guesses and then checking them out. If you can open up the system and inspect its insides, you can see if the variables and relationships are really there. But this is usually not practical, especially when opening up the system changes its organization. What we end up with in cases like this is not a model we can prove to exist in the best possible way. All we can say is that if the real system were organized internally as the model is organized, it would have to behave as the model behaves. Not to behave that way would be to violate known laws of nature and mathematical truths proven long ago.


We generate a correct model, or as near as we can get to that ideal, by proposing incorrect models and then figuring out why their behavior was different from the behavior of the real system, and fixing the errors. This is an iterative process which converges, sometimes rapidly and sometimes slowly, to a final form. We know the form is final if we find that changing anything about the model makes its imitation of the real system less accurate. And we know that we’re on the wrong track if no changes can make the model’s behavior resemble the real behavior at all.


When we finally produce a good model that matches what the real system does, we can give it the ultimate test: change the conditions, and see how well the model predicts how the real behavior will change. And then, at last, we can use the model to predict behavior in the real system that has not yet been seen, under conditions we can know about only as they occur.


Lafayette, CO
2009.09.24