March 21, 2011
March 13, 2011
“What’s a ‘p-value’ and why do I need one?”
Late last night somebody asked me roughly that question, which led me to realize that I can’t really formulate a clear description of what’s going on in regression analysis. So I thought I’d write a post and give it a try.
Imagine that somebody tells you that, because of a recent head trauma he suffered, he can accurately predict the outcome of coin tosses. Not being an overly credulous person, but having seen a number of sitcoms where such events are possible, you want to find out whether or not what your friend says is true.
You propose a simple test: your friend makes a prediction, “heads” or “tails,” and then you flip a coin and record whether or not he got the prediction right. You will then repeat this simple procedure for 10 total coin flips, and add up his scores to see how many he got right overall.
From intuition, it’s clear that getting, say, 6 right out of 10 would not be a very impressive result. After all, anyone has a 50% chance of guessing the outcome of any given coin toss. You would hardly be ready to declare your friend psychic if he got one more correct answer than you would expect from pure chance.
How many correct answers would it take to convince you that there is something to these legendary sitcom injuries? Eight correct? Nine? When you make this judgment, you are implicitly comparing your friend’s result to the result you would expect from a person with no special powers, and thinking about whether the difference between those two results is large enough to be convincing.
The p-value is just a formalization of this intuition (the “p” stands for “probability”). After you perform the test and look at the number your friend got correct, you want to answer the question, “What is the chance I would see a result as extreme as the one I am now seeing, if my friend were just a normal person with no powers?”
For flipping coins, it turns out this question is very easy to answer. If you guess and flip a coin once, your chance of getting it right is 50%. The chance of getting it right twice in a row is 25%. The chance of getting it wrong twice in a row is also 25%. Some basic extensions of this type of reasoning leads to the following table, for 10 coin flips:
To put the same information in a chart, it looks like this:
At this point, it helps to reformulate what your friend is saying into a testable hypothesis. What we would expect, for a normal person, is that when doing this test with 10 coin flips, the average number they would get right is five. What your friend is saying, in effect, is “My personal average is not five.” The purpose of this test is to figure out whether it’s reasonable to believe your friend.
Okay, so let’s say you do the test and your friend gets 8 out of 10. Vindicated? I don’t know, let’s see. If his real average is 5, what is the chance of seeing a result at least as far away from 5 as this is? To find out, we look at all the results that are at least three away from five. That means 8, 9, and 10, but also 0, 1, and 2. Adding up all those percentages, we find that the probability that a normal person would get a result at least this extreme is almost 11%. It was a pretty good performance overall, but not really overwhelming evidence of psychic powers.
What if you had performed the test and your friend got 0 out of 10 correct? That is, every single time he says “heads,” it comes up “tails,” and vice-versa. Even though all his answers were wrong, you could still take this as strong evidence that his personal expected average is different from 5. According to the table, in only .20% of cases would you see a result as extreme as this one for a normal person (chance of getting 0 right plus chance of getting 10 right). Even though he got all the answers wrong, it would still seem to be the case that you can just reverse all his predictions and do better than chance.
So this is basically what we’re trying to do when we do statistical analysis. We have this information, our friend saying “heads” or “tails,” that we’re trying to use to predict a real-world event, a coin actually coming up either heads or tails. We want to know if his information helps us make better predictions or if they’re just garbage. The p-value is a way to measure that. It tells us that if his predictions were really garbage, this is the probability that they would have seemed to provide a prediction at least as useful as the one they actually did provide.
March 6, 2011
Since I brought up Adam Smith’s famous line in my last post, “It is not from the benevolence of the butcher, the brewer, or the baker that we expect our dinner, but from their regard to their own interest,” I feel obliged to add that it is my understanding, conveyed to me via Ronald Coase’s paper “Adam Smith’s View of Man,” that this line is commonly misunderstood.
Coase quotes Smith from the passage leading up to his famous line: “In civilized society [man] stands at all times in need of the co-operation and assistance of great multitudes, while his whole life is scarce sufficient to gain the friendship of a few persons.”
Benevolence and regard for others is a good thing, and it is something we should cultivate in ourselves. However, a modern economy is just too big and we just don’t have enough time to develop real, close relationships with everyone on whom we depend in order to survive. Smith, then, wasn’t defending a “greed is good” mentality or praising selfishness. He was saying, look, benevolence is great, but it requires a lot of time to set up and maintain. Where it’s feasible, we should go with benevolence; only a monster would think of self-interest when dealing with his family and friends. But when we start talking about interacting with thousands or millions of people, benevolence isn’t a feasible solution anymore.
March 6, 2011
And we’re back.
Previously, I said that the StarLogo program demonstrates three important lessons. The first was that when people make decisions, they are limited by the information they have available. Now here is the second lesson: information has to be not only available, but usable.
This is the source of a common mistake people make about the price system. Some believe that the price system and markets are still pretty terrible, but after all, we do need profits to motivate selfish people, so we will keep them until we come up with something better. People who say that understand one aspect of the price system, but they are ignoring something even more important.
Harold Demsetz once wrote that any acceptable allocation system has to do two things: 1. Generate information about what is needed and 2. Motivate people to act upon that information. The common view of prices and profits is that they fulfill the second condition. And that’s right, they do, but very importantly, they also generate the valuable information people need to make decisions.
Think of a farmer growing food. How will he know how much food to grow? In general, some of his land will be better for growing food than other parts, so the more food he grows, the more difficult it is to grow more food using additional land or by planting more densely. He is always facing a choice, whether to use the necessary resources to grow more food or whether to save those resources to be used for something else.
What a daunting task this would be for anyone! There are millions of farmers who can supply food, and millions of other ways that someone might use the resources our farmer is thinking of using. Somehow he has to figure out, not only whether some other farmer would be able to provide food using less resources than he would, but also whether some person in any job might be able to use the resources he is using for farming in some other, better, way.
Hayek referred to the price system as a “marvel” because it can solve this problem. A farmer doesn’t need to know and understand the facts about all the different possible demands for food or all the possible other uses for his resources. All he needs to know is, will it cost less, in monetary terms, to grow more food? If he would lose money from growing food, that is a signal, from all the people around him, that he is wasting resources by using them in a way that people don’t care about as much.
Thinkers and intellectuals are divided on whether Adam Smith’s famous line about the self-interest of the butcher and the baker is a good thing or a bad thing about the market system. The divide is something like: economists on one side, everyone else on the other. I admit, I do think there is something wonderful about the market’s ability to harness self-interest to serve others, but I also admit that justifying self-interest is distasteful. Greed really isn’t good, even though a well-designed system can mitigate its bad effects.
But forget about motivation, and let everyone be interested only in helping other people. How is this other-oriented person supposed to know what people want him to do? Even though he’s not motivated by profit, he’s not omniscient, either. He needs information transmitted to him about what people want, and how much of it they want, and when they want it. The information he gets has to be compact and easy to understand and usable by millions of people at the same time. Providing that information is what prices do.
February 25, 2011
Just a quote:
4.4 Labor Unions
Labor unions, whether company or industry, can, by collective action, protect employees’ firm-dependent values. Employees who have made their own investments in firm-specific skills in response to employer promises, or who have earned rights to future insurance and retirement benefits, want to monitor the employer’s performance and restrain the employer from expropriating those firm-specific rewards. This is a major defense of unions and if this were their only function, firms would not object to them. After all, an employer who borrows from a bank does not oppose monitoring by the bank, as the monitoring makes the loan cheaper. Despite this beneficial effect of organized employees, firms fear the reverse risk of employees expropriating employers’ quasi-rents.
-Armen Alchian and Susan Woodward, “Reflections on the Theory of the Firm,” Alchian’s Collected Works Vol. 2, p. 311
P.S. A quasi-rent is like a reward for past investment. Once you have invested in skills to perform a specific job, you won’t quit if they give you a lower wage, because your skills mean you are still earning more in that job than you could in another.
February 20, 2011
Those who love New York and love talking about it will occasionally hear legends of individuals or couples who have become the big winners of the rent control system. $600 for a penthouse on the Upper West Side, $800 for a two-bedroom in Park Slope, whatever the legendary deal is, the implication is clear: the lucky renter can never move, since he or she is unlikely to ever find such a good deal again.
An important feature of the price system, as pointed out by Harold Demsetz in his article “Toward a Theory of Property Rights,” (PDF) is that it forces people to take into account the costs that their actions impose upon other people. Take the rent-controlled apartment as an example, and let’s make up some numbers.
Say a couple, the Mieters, own an apartment and have an arrangement with the bank whereby they pay $800 a month to maintain ownership. Now introduce another couple, the Einzers, who are willing to pay $3000 for that same apartment. The Mieters can decide how to use the apartment, whether to live in it themselves or allow the Einzers to move in and live there instead. If the Mieters choose to live there themselves, they will be imposing a cost on the Einzers. That they are “imposing a cost” doesn’t mean they are doing anything wrong. By assumption, the Mieters have the right to decide who gets to use the apartment. As a simple fact, though, the Einzers are prevented from using the apartment by their decision.
If you can trade and sell property rights, though, that’s not the end of the story. The Mieters are not just imposing a cost on the Einzers, they are also imposing that same cost on themselves. How? Because every month that they decide to stay in the apartment, they are effectively giving up the rent that the Einzers would have paid them to stay there. The Mieters have to decide what they would rather have, the apartment or the money.
What if we change the situation and there are rules stipulating that people are not allowed to sell the right to live in an apartment to anyone else. The preferences have not changed. The Einzers would still be willing to pay the $3,000 for the Mieters’ apartment. But now the Mieters say, basically, “Who cares?” Sure, the Einzers would be willing to pay $3,000, but that option is blocked. They’re imposing the same cost as before (not that there’s anything wrong with that!), but now they are no longer made to feel the effect of the cost they are imposing.
A system of property rights is all about, to use Demsetz’s phrase, “internalizing the externalities.” Every time you use a resource, you are imposing a cost, an externality, on someone else who can’t use it at the same time. But if you can sell your right to use it, even if you don’t actually exercise that option, the full effect of your choice is brought to bear on you, either in the monetary compensation when you actually do sell it, or by the fact that you are giving up that compensation when you choose not to.
February 19, 2011
Real-life economies are too complicated to be understood in their entirely. That’s why a program like StarLogo can help us out.
The first lesson we can learn from the program is that our actions are only as good or as rational as the information we have to act on. This is the stuff of great tragedies and 10th grade English composition word lists: dramatic irony. If only Romeo hadn’t missed that message, he would have known Juliet wasn’t really dead, and waited for her to wake up instead of killing himself. If Othello knew that Iago was out to get him, and Desdemona was truly faithful, the whole play wouldn’t have happened. Omar shot Brother Mouzone. All of these characters acted on the information they had, not on the information that was in some sense “out there” to be known.
F.A. Hayek’s famous essay “The Use of Knowledge in Society” is about the same problem in the context of a whole economy. Specifically, Hayek explores how hard it is to work out the information problem of society, to make sure that everyone knows what they need to know, when they need to know it. As observers of the economy, we want the economic order to be “rational,” meaning that no goods are being used in less-valuable ways when there are more-valuable ways available. I shouldn’t die of thirst because I used up all the water washing my car. But naturally, if we want to make sure nothing so absurd happens, we have to be able to identify which the valuable uses are and we have to be able to prioritize them.
The essence of the solution has two parts, transmission and reception. In StarLogo, the ants can only know what is in their immediate surroundings, whether they are standing on food or whether they can sense the nest or the “food trail” left by other ants. And they’re all standing on their respective squares, knowing different things. If anything resembling an efficient process of food collection is going to happen, they need a way to communicate with each other and guide each other’s actions. The “food chemical” is a way to do that. When an ant drops the chemical, he is leaving an indication of what he knows for other ants. When another ant senses that chemical, he suddenly has information available to him that he can use to make better decisions.
For people in an economy, prices are what we use to communicate with each other about the best uses of scarce resources. I ask you to walk my dog, and you say you’ll only do it for $20 an hour. You’re telling me, “hey, unless you are willing to pay at least $20 for this, I really shouldn’t be walking your dog. There are other, more valuable things I could be doing with that time. If I walked your dog, it would be a waste.”
I should note a couple of other good things about prices and the solution to this information problem. First, prices give people a reason to tell the truth about the uses of resources. I may say “I really, really want you to walk my dog,” but my offering you $20 is a chance to show that I mean it sincerely. Second, as I have been saying, knowing the price gives me more and better information that I can act on. Knowing what something costs and what else I could buy with that money gives me a better chance of using resources wisely.
As you are well aware, Knowledge is Power. In this case, the power to make good decisions. The StarLogo program shows us a bunch of ants, each of whom is pretty dumb and follows simple rules, but they are able to accomplish a lot just by the way they transmit and receive information.
So are we, and that’s lesson one.